Lines Matching defs:state

194 /* Given a module object, get its per-module state. */
202 and get its state. */
209 /* Clear the given pickle module state. */
229 /* Initialize the given pickle module state. */
3961 PyObject *state = NULL;
3982 &callable, &argtup, &state, &listitems, &dictitems,
3997 if (state == Py_None)
3998 state = NULL;
4240 if (state) {
4242 if (save(self, state, 0) < 0 ||
4249 * update obj's with its previous state.
4251 * tuple of expected arguments (obj, state) onto the stack. The
4252 * REDUCE opcode triggers the state_setter(obj, state) function
4253 * call. Finally, because state-updating routines only do in-place
4260 save(self, obj, 0) < 0 || save(self, state, 0) < 0 ||
6643 PyObject *state, *inst, *slotstate;
6647 /* Stack is ... instance, state. We want to leave instance at
6648 * the stack top, possibly mutated via instance.__setstate__(state).
6653 PDATA_POP(self->stack, state);
6654 if (state == NULL)
6660 Py_DECREF(state);
6667 result = _Pickle_FastCall(setstate, state);
6675 /* A default __setstate__. First see whether state embeds a
6676 * slot state dict too (a proto 2 addition).
6678 if (PyTuple_Check(state) && PyTuple_GET_SIZE(state) == 2) {
6679 PyObject *tmp = state;
6681 state = PyTuple_GET_ITEM(tmp, 0);
6683 Py_INCREF(state);
6690 /* Set inst.__dict__ from the state dict (if any). */
6691 if (state != Py_None) {
6696 if (!PyDict_Check(state)) {
6698 PyErr_SetString(st->UnpicklingError, "state is not a dictionary");
6706 while (PyDict_Next(state, &i, &d_key, &d_value)) {
6729 "slot state is not a dictionary");
6744 Py_DECREF(state);