Lines Matching defs:impl
118 PyObject *impl = PyObject_GetAttr(self, &_Py_ID(_abc_impl));
119 if (impl == NULL) {
122 if (!Py_IS_TYPE(impl, state->_abc_data_type)) {
124 Py_DECREF(impl);
127 return (_abc_data *)impl;
219 _abc_data *impl = _get_impl(module, self);
220 if (impl == NULL) {
223 if (impl->_abc_registry != NULL && PySet_Clear(impl->_abc_registry) < 0) {
224 Py_DECREF(impl);
227 Py_DECREF(impl);
246 _abc_data *impl = _get_impl(module, self);
247 if (impl == NULL) {
250 if (impl->_abc_cache != NULL && PySet_Clear(impl->_abc_cache) < 0) {
251 Py_DECREF(impl);
255 if (impl->_abc_negative_cache != NULL &&
256 PySet_Clear(impl->_abc_negative_cache) < 0) {
257 Py_DECREF(impl);
260 Py_DECREF(impl);
281 _abc_data *impl = _get_impl(module, self);
282 if (impl == NULL) {
286 PySet_New(impl->_abc_registry),
287 PySet_New(impl->_abc_cache),
288 PySet_New(impl->_abc_negative_cache),
289 impl->_abc_negative_cache_version);
290 Py_DECREF(impl);
544 _abc_data *impl = _get_impl(module, self);
545 if (impl == NULL) {
548 if (_add_to_weak_set(&impl->_abc_registry, subclass) < 0) {
549 Py_DECREF(impl);
552 Py_DECREF(impl);
585 _abc_data *impl = _get_impl(module, self);
586 if (impl == NULL) {
592 Py_DECREF(impl);
596 int incache = _in_weak_set(impl->_abc_cache, subclass);
607 if (impl->_abc_negative_cache_version == get_abc_state(module)->abc_invalidation_counter) {
608 incache = _in_weak_set(impl->_abc_negative_cache, subclass);
646 Py_XDECREF(impl);
655 static int subclasscheck_check_registry(_abc_data *impl, PyObject *subclass,
682 _abc_data *impl = _get_impl(module, self);
683 if (impl == NULL) {
688 incache = _in_weak_set(impl->_abc_cache, subclass);
699 if (impl->_abc_negative_cache_version < state->abc_invalidation_counter) {
701 if (impl->_abc_negative_cache != NULL &&
702 PySet_Clear(impl->_abc_negative_cache) < 0)
706 impl->_abc_negative_cache_version = state->abc_invalidation_counter;
709 incache = _in_weak_set(impl->_abc_negative_cache, subclass);
727 if (_add_to_weak_set(&impl->_abc_cache, subclass) < 0) {
735 if (_add_to_weak_set(&impl->_abc_negative_cache, subclass) < 0) {
756 if (_add_to_weak_set(&impl->_abc_cache, subclass) < 0) {
765 if (subclasscheck_check_registry(impl, subclass, &result)) {
785 if (_add_to_weak_set(&impl->_abc_cache, subclass) < 0) {
797 if (_add_to_weak_set(&impl->_abc_negative_cache, subclass) < 0) {
803 Py_DECREF(impl);
811 subclasscheck_check_registry(_abc_data *impl, PyObject *subclass,
815 int ret = _in_weak_set(impl->_abc_registry, subclass);
825 if (impl->_abc_registry == NULL) {
828 Py_ssize_t registry_size = PySet_Size(impl->_abc_registry);
844 while (_PySet_NextEntry(impl->_abc_registry, &pos, &key, &hash)) {
868 if (_add_to_weak_set(&impl->_abc_cache, subclass) < 0) {