Lines Matching refs:state
789 PyObject *state;
805 state = Py_BuildValue("(OnN)", initvalue, self->pos, dict);
807 return state;
811 bytesio_setstate(bytesio *self, PyObject *state)
818 assert(state != NULL);
820 /* We allow the state tuple to be longer than 3, because we may need
821 someday to extend the object's state without breaking
823 if (!PyTuple_Check(state) || PyTuple_GET_SIZE(state) < 3) {
826 Py_TYPE(self)->tp_name, Py_TYPE(state)->tp_name);
830 /* Reset the object to its default state. This is only needed to handle
835 /* Set the value of the internal buffer. If state[0] does not support the
837 result = _io_BytesIO_write(self, PyTuple_GET_ITEM(state, 0));
844 object internal state against erroneous (or malicious) inputs. */
845 position_obj = PyTuple_GET_ITEM(state, 1);
848 "second item of state must be an integer, not %.200s",
863 dict = PyTuple_GET_ITEM(state, 2);
867 "third item of state should be a dict, got a %.200s",