Lines Matching refs:self

45 abc_data_traverse(_abc_data *self, visitproc visit, void *arg)
47 Py_VISIT(Py_TYPE(self));
48 Py_VISIT(self->_abc_registry);
49 Py_VISIT(self->_abc_cache);
50 Py_VISIT(self->_abc_negative_cache);
55 abc_data_clear(_abc_data *self)
57 Py_CLEAR(self->_abc_registry);
58 Py_CLEAR(self->_abc_cache);
59 Py_CLEAR(self->_abc_negative_cache);
64 abc_data_dealloc(_abc_data *self)
66 PyObject_GC_UnTrack(self);
67 PyTypeObject *tp = Py_TYPE(self);
68 (void)abc_data_clear(self);
69 tp->tp_free(self);
76 _abc_data *self = (_abc_data *) type->tp_alloc(type, 0);
78 if (self == NULL) {
84 Py_DECREF(self);
88 self->_abc_registry = NULL;
89 self->_abc_cache = NULL;
90 self->_abc_negative_cache = NULL;
91 self->_abc_negative_cache_version = state->abc_invalidation_counter;
92 return (PyObject *) self;
115 _get_impl(PyObject *module, PyObject *self)
118 PyObject *impl = PyObject_GetAttr(self, &_Py_ID(_abc_impl));
207 self: object
216 _abc__reset_registry(PyObject *module, PyObject *self)
219 _abc_data *impl = _get_impl(module, self);
234 self: object
243 _abc__reset_caches(PyObject *module, PyObject *self)
246 _abc_data *impl = _get_impl(module, self);
267 self: object
278 _abc__get_dump(PyObject *module, PyObject *self)
281 _abc_data *impl = _get_impl(module, self);
296 compute_abstract_methods(PyObject *self)
307 ns = PyObject_GetAttr(self, &_Py_ID(__dict__));
351 bases = PyObject_GetAttr(self, &_Py_ID(__bases__));
378 if (_PyObject_LookupAttr(self, key, &value) < 0) {
405 if (PyObject_SetAttr(self, &_Py_ID(__abstractmethods__), abstracts) < 0) {
423 self: object
430 _abc__abc_init(PyObject *module, PyObject *self)
435 if (compute_abstract_methods(self) < 0) {
444 if (PyObject_SetAttr(self, &_Py_ID(_abc_impl), data) < 0) {
453 if (PyType_Check(self)) {
454 PyTypeObject *cls = (PyTypeObject *)self;
472 ((PyTypeObject *)self)->tp_flags |= (val & COLLECTION_FLAGS);
510 self: object
518 _abc__abc_register_impl(PyObject *module, PyObject *self, PyObject *subclass)
525 int result = PyObject_IsSubclass(subclass, self);
535 result = PyObject_IsSubclass(self, subclass);
544 _abc_data *impl = _get_impl(module, self);
558 if (PyType_Check(self)) {
559 unsigned long collection_flag = ((PyTypeObject *)self)->tp_flags & COLLECTION_FLAGS;
572 self: object
580 _abc__abc_instancecheck_impl(PyObject *module, PyObject *self,
585 _abc_data *impl = _get_impl(module, self);
619 result = PyObject_CallMethodOneArg(self, &_Py_ID(__subclasscheck__),
623 result = PyObject_CallMethodOneArg(self, &_Py_ID(__subclasscheck__),
636 result = PyObject_CallMethodOneArg(self, &_Py_ID(__subclasscheck__),
661 self: object
669 _abc__abc_subclasscheck_impl(PyObject *module, PyObject *self,
682 _abc_data *impl = _get_impl(module, self);
721 (PyObject *)self, &_Py_ID(__subclasshook__), subclass);
755 if ((PyObject *)self == mro_item) {
771 subclasses = PyObject_CallMethod(self, "__subclasses__", NULL);