Lines Matching defs:self
41 Example_traverse(ExampleObject *self, visitproc visit, void *arg)
43 Py_VISIT(self->x_attr);
48 Example_finalize(ExampleObject *self)
50 Py_CLEAR(self->x_attr);
54 Example_demo(ExampleObject *self, PyObject *args)
75 Example_getattro(ExampleObject *self, PyObject *name)
77 if (self->x_attr != NULL) {
78 PyObject *v = PyDict_GetItemWithError(self->x_attr, name);
87 return PyObject_GenericGetAttr((PyObject *)self, name);
91 Example_setattr(ExampleObject *self, const char *name, PyObject *v)
93 if (self->x_attr == NULL) {
94 self->x_attr = PyDict_New();
95 if (self->x_attr == NULL)
99 int rv = PyDict_DelItemString(self->x_attr, name);
106 return PyDict_SetItemString(self->x_attr, name, v);
144 _testmultiphase_StateAccessType_get_defining_module_impl(StateAccessTypeObject *self,
153 assert(PyType_GetModuleByDef(Py_TYPE(self), &def_meth_state_access) == retval);
167 _testmultiphase_StateAccessType_getmodulebydef_bad_def_impl(StateAccessTypeObject *self,
171 PyType_GetModuleByDef(Py_TYPE(self), &def_nonmodule); // should raise
193 _testmultiphase_StateAccessType_increment_count_clinic_impl(StateAccessTypeObject *self,
208 "decrement_count($self, /, n=1, *, twice=None)\n"
217 _StateAccessType_increment_count_noclinic(StateAccessTypeObject *self,
262 _testmultiphase_StateAccessType_get_count_impl(StateAccessTypeObject *self,
306 testexport_foo(PyObject *self, PyObject *args)
509 nonmodule_bar(PyObject *self, PyObject *args)