Lines Matching defs:state
16 void *state = _PyModule_GetState(module);
17 assert(state != NULL);
18 return (_operator_state *)state;
1006 _operator_state *state = PyType_GetModuleState(type);
1008 ig = PyObject_GC_New(itemgetterobject, (PyTypeObject *) state->itemgetter_type);
1151 PyDoc_STRVAR(reduce_doc, "Return state information for pickling");
1308 _operator_state *state = PyType_GetModuleState(type);
1310 ag = PyObject_GC_New(attrgetterobject, (PyTypeObject *)state->attrgetter_type);
1590 _operator_state *state = PyType_GetModuleState(type);
1592 mc = PyObject_GC_New(methodcallerobject, (PyTypeObject *)state->methodcaller_type);
1818 _operator_state *state = get_operator_state(module);
1819 state->attrgetter_type = PyType_FromModuleAndSpec(module, &attrgetter_type_spec, NULL);
1820 if (state->attrgetter_type == NULL) {
1823 if (PyModule_AddType(module, (PyTypeObject *)state->attrgetter_type) < 0) {
1827 state->itemgetter_type = PyType_FromModuleAndSpec(module, &itemgetter_type_spec, NULL);
1828 if (state->itemgetter_type == NULL) {
1831 if (PyModule_AddType(module, (PyTypeObject *)state->itemgetter_type) < 0) {
1835 state->methodcaller_type = PyType_FromModuleAndSpec(module, &methodcaller_type_spec, NULL);
1836 if (state->methodcaller_type == NULL) {
1839 if (PyModule_AddType(module, (PyTypeObject *)state->methodcaller_type) < 0) {
1855 _operator_state *state = get_operator_state(module);
1856 Py_VISIT(state->attrgetter_type);
1857 Py_VISIT(state->itemgetter_type);
1858 Py_VISIT(state->methodcaller_type);
1865 _operator_state *state = get_operator_state(module);
1866 Py_CLEAR(state->attrgetter_type);
1867 Py_CLEAR(state->itemgetter_type);
1868 Py_CLEAR(state->methodcaller_type);