Home
last modified time | relevance | path

Searched refs:Py_TYPE (Results 1 – 25 of 349) sorted by relevance

12345678910>>...14

/external/python/cpython3/Include/
Dsetobject.h91 #define PyFrozenSet_CheckExact(ob) (Py_TYPE(ob) == &PyFrozenSet_Type)
93 (Py_TYPE(ob) == &PySet_Type || Py_TYPE(ob) == &PyFrozenSet_Type)
95 (Py_TYPE(ob) == &PySet_Type || Py_TYPE(ob) == &PyFrozenSet_Type || \
96 PyType_IsSubtype(Py_TYPE(ob), &PySet_Type) || \
97 PyType_IsSubtype(Py_TYPE(ob), &PyFrozenSet_Type))
99 (Py_TYPE(ob) == &PySet_Type || \
100 PyType_IsSubtype(Py_TYPE(ob), &PySet_Type))
102 (Py_TYPE(ob) == &PyFrozenSet_Type || \
103 PyType_IsSubtype(Py_TYPE(ob), &PyFrozenSet_Type))
Dobject.h122 #define Py_TYPE(ob) (_PyObject_CAST(ob)->ob_type) macro
204 (Py_TYPE(ob) == (tp) || PyType_IsSubtype(Py_TYPE(ob), (tp)))
213 PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_TYPE_SUBCLASS)
214 #define PyType_CheckExact(op) (Py_TYPE(op) == &PyType_Type)
411 #define _Py_INC_TPALLOCS(OP) _Py_inc_count(Py_TYPE(OP))
412 #define _Py_INC_TPFREES(OP) _Py_dec_count(Py_TYPE(OP))
413 #define _Py_DEC_TPFREES(OP) Py_TYPE(OP)->tp_frees--
736 Py_TYPE(op)->tp_dealloc == (destructor)(dealloc))
Dcontext.h20 #define PyContext_CheckExact(o) (Py_TYPE(o) == &PyContext_Type)
21 #define PyContextVar_CheckExact(o) (Py_TYPE(o) == &PyContextVar_Type)
22 #define PyContextToken_CheckExact(o) (Py_TYPE(o) == &PyContextToken_Type)
Dweakrefobject.h49 (Py_TYPE(op) == &_PyWeakref_RefType)
51 ((Py_TYPE(op) == &_PyWeakref_ProxyType) || \
52 (Py_TYPE(op) == &_PyWeakref_CallableProxyType))
Ddatetime.h199 #define PyDate_CheckExact(op) (Py_TYPE(op) == PyDateTimeAPI->DateType)
202 #define PyDateTime_CheckExact(op) (Py_TYPE(op) == PyDateTimeAPI->DateTimeType)
205 #define PyTime_CheckExact(op) (Py_TYPE(op) == PyDateTimeAPI->TimeType)
208 #define PyDelta_CheckExact(op) (Py_TYPE(op) == PyDateTimeAPI->DeltaType)
211 #define PyTZInfo_CheckExact(op) (Py_TYPE(op) == PyDateTimeAPI->TZInfoType)
Dgenobject.h41 #define PyGen_CheckExact(op) (Py_TYPE(op) == &PyGen_Type)
64 #define PyCoro_CheckExact(op) (Py_TYPE(op) == &PyCoro_Type)
95 #define PyAsyncGen_CheckExact(op) (Py_TYPE(op) == &PyAsyncGen_Type)
Diterobject.h12 #define PySeqIter_Check(op) (Py_TYPE(op) == &PySeqIter_Type)
17 #define PyCallIter_Check(op) (Py_TYPE(op) == &PyCallIter_Type)
/external/python/cpython2/Include/
Dsetobject.h69 #define PyFrozenSet_CheckExact(ob) (Py_TYPE(ob) == &PyFrozenSet_Type)
71 (Py_TYPE(ob) == &PySet_Type || Py_TYPE(ob) == &PyFrozenSet_Type)
73 (Py_TYPE(ob) == &PySet_Type || Py_TYPE(ob) == &PyFrozenSet_Type || \
74 PyType_IsSubtype(Py_TYPE(ob), &PySet_Type) || \
75 PyType_IsSubtype(Py_TYPE(ob), &PyFrozenSet_Type))
77 (Py_TYPE(ob) == &PySet_Type || \
78 PyType_IsSubtype(Py_TYPE(ob), &PySet_Type))
80 (Py_TYPE(ob) == &PyFrozenSet_Type || \
81 PyType_IsSubtype(Py_TYPE(ob), &PyFrozenSet_Type))
Ddatetime.h171 #define PyDate_CheckExact(op) (Py_TYPE(op) == &PyDateTime_DateType)
174 #define PyDateTime_CheckExact(op) (Py_TYPE(op) == &PyDateTime_DateTimeType)
177 #define PyTime_CheckExact(op) (Py_TYPE(op) == &PyDateTime_TimeType)
180 #define PyDelta_CheckExact(op) (Py_TYPE(op) == &PyDateTime_DeltaType)
183 #define PyTZInfo_CheckExact(op) (Py_TYPE(op) == &PyDateTime_TZInfoType)
195 #define PyDate_CheckExact(op) (Py_TYPE(op) == PyDateTimeAPI->DateType)
198 #define PyDateTime_CheckExact(op) (Py_TYPE(op) == PyDateTimeAPI->DateTimeType)
201 #define PyTime_CheckExact(op) (Py_TYPE(op) == PyDateTimeAPI->TimeType)
204 #define PyDelta_CheckExact(op) (Py_TYPE(op) == PyDateTimeAPI->DeltaType)
207 #define PyTZInfo_CheckExact(op) (Py_TYPE(op) == PyDateTimeAPI->TZInfoType)
Ddictobject.h100 PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_DICT_SUBCLASS)
101 #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
102 #define PyDictKeys_Check(op) (Py_TYPE(op) == &PyDictKeys_Type)
103 #define PyDictItems_Check(op) (Py_TYPE(op) == &PyDictItems_Type)
104 #define PyDictValues_Check(op) (Py_TYPE(op) == &PyDictValues_Type)
Dweakrefobject.h47 (Py_TYPE(op) == &_PyWeakref_RefType)
49 ((Py_TYPE(op) == &_PyWeakref_ProxyType) || \
50 (Py_TYPE(op) == &_PyWeakref_CallableProxyType))
Dobject.h115 #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) macro
433 ((PyMemberDef *)(((char *)etype) + Py_TYPE(etype)->tp_basicsize))
439 (Py_TYPE(ob) == (tp) || PyType_IsSubtype(Py_TYPE(ob), (tp)))
446 PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_TYPE_SUBCLASS)
447 #define PyType_CheckExact(op) (Py_TYPE(op) == &PyType_Type)
731 #define _Py_INC_TPALLOCS(OP) inc_count(Py_TYPE(OP))
732 #define _Py_INC_TPFREES(OP) dec_count(Py_TYPE(OP))
733 #define _Py_DEC_TPFREES(OP) Py_TYPE(OP)->tp_frees--
764 (*Py_TYPE(op)->tp_dealloc)((PyObject *)(op)))
Dobjimpl.h164 ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) )
241 #define PyObject_IS_GC(o) (PyType_IS_GC(Py_TYPE(o)) && \
242 (Py_TYPE(o)->tp_is_gc == NULL || Py_TYPE(o)->tp_is_gc(o)))
364 ((PyObject **) (((char *) (o)) + Py_TYPE(o)->tp_weaklistoffset))
Diterobject.h10 #define PySeqIter_Check(op) (Py_TYPE(op) == &PySeqIter_Type)
16 #define PyCallIter_Check(op) (Py_TYPE(op) == &PyCallIter_Type)
/external/python/cpython3/Objects/
Dobject.c259 Py_TYPE(op) = tp; in PyObject_Init()
302 PyTypeObject *tp = Py_TYPE(self); in PyObject_CallFinalizer()
347 (!PyType_IS_GC(Py_TYPE(self)) in PyObject_CallFinalizerFromDealloc()
359 --Py_TYPE(self)->tp_frees; in PyObject_CallFinalizerFromDealloc()
360 --Py_TYPE(self)->tp_allocs; in PyObject_CallFinalizerFromDealloc()
484 PyTypeObject *type = Py_TYPE(op); in _PyObject_Dump()
521 if (Py_TYPE(v)->tp_repr == NULL) in PyObject_Repr()
576 if (Py_TYPE(v)->tp_str == NULL) in PyObject_Str()
590 res = (*Py_TYPE(v)->tp_str)(v); in PyObject_Str()
597 Py_TYPE(res)->tp_name); in PyObject_Str()
[all …]
Denumobject.c88 Py_TYPE(en)->tp_free(en); in enum_dealloc()
156 next_item = (*Py_TYPE(it)->tp_iternext)(it); in enum_next()
195 return Py_BuildValue("O(OO)", Py_TYPE(en), en->en_sit, en->en_longindex); in enum_reduce()
197 return Py_BuildValue("O(On)", Py_TYPE(en), en->en_sit, en->en_index); in enum_reduce()
283 Py_TYPE(seq)->tp_name); in reversed_new_impl()
297 Py_TYPE(seq)->tp_name); in reversed_new_impl()
320 Py_TYPE(ro)->tp_free(ro); in reversed_dealloc()
371 return Py_BuildValue("O(O)n", Py_TYPE(ro), ro->seq, ro->index); in reversed_reduce()
373 return Py_BuildValue("O(())", Py_TYPE(ro)); in reversed_reduce()
Dtypeobject.c301 int custom = (Py_TYPE(type) != &PyType_Type); in type_mro_modified()
479 type->tp_name, Py_TYPE(value)->tp_name); in type_set_name()
509 type->tp_name, Py_TYPE(value)->tp_name); in type_set_qualname()
711 type->tp_name, Py_TYPE(new_bases)->tp_name); in type_set_bases()
728 type->tp_name, Py_TYPE(ob)->tp_name); in type_set_bases()
853 else if (Py_TYPE(result)->tp_descr_get) { in type_get_doc()
854 result = Py_TYPE(result)->tp_descr_get(result, NULL, in type_get_doc()
986 if (!PyType_IsSubtype(Py_TYPE(obj), type)) in type_call()
989 type = Py_TYPE(obj); in type_call()
1069 type = Py_TYPE(self); in subtype_traverse()
[all …]
Dweakrefobject.c109 Py_TYPE(self)->tp_free(self); in weakref_dealloc()
180 Py_TYPE(PyWeakref_GET_OBJECT(self))->tp_name, in weakref_repr()
187 Py_TYPE(PyWeakref_GET_OBJECT(self))->tp_name, in weakref_repr()
300 if (!PyType_SUPPORTS_WEAKREFS(Py_TYPE(ob))) { in weakref___new__()
303 Py_TYPE(ob)->tp_name); in weakref___new__()
499 Py_TYPE(PyWeakref_GET_OBJECT(proxy))->tp_name, in WRAP_BINARY()
801 if (!PyType_SUPPORTS_WEAKREFS(Py_TYPE(ob))) { in PyWeakref_NewRef()
804 Py_TYPE(ob)->tp_name); in PyWeakref_NewRef()
860 if (!PyType_SUPPORTS_WEAKREFS(Py_TYPE(ob))) { in PyWeakref_NewProxy()
863 Py_TYPE(ob)->tp_name); in PyWeakref_NewProxy()
[all …]
/external/python/cpython3/Modules/
Ditertoolsmodule.c110 Py_TYPE(gbo)->tp_free(gbo); in groupby_dealloc()
196 value = Py_BuildValue("O(OO)(OOO)", Py_TYPE(lz), in groupby_reduce()
199 value = Py_BuildValue("O(OO)", Py_TYPE(lz), in groupby_reduce()
376 return Py_BuildValue("O(OO)", Py_TYPE(lz), lz->parent, lz->tgtkey); in _grouper_reduce()
530 while (obj && Py_TYPE(obj) == &teedataobject_type && in teedataobject_safe_decref()
576 return Py_BuildValue("O(ONO)", Py_TYPE(tdo), tdo->it, in teedataobject_reduce()
617 if (Py_TYPE(next) != &teedataobject_type) in itertools_teedataobject_impl()
798 return Py_BuildValue("O(())(Oi)", Py_TYPE(to), to->dataobj, to->index); in tee_reduce()
1002 Py_TYPE(lz)->tp_free(lz); in cycle_dealloc()
1063 return Py_BuildValue("O(N)(Oi)", Py_TYPE(lz), it, lz->saved, 1); in cycle_reduce()
[all …]
/external/python/cpython2/Objects/
Dobject.c223 Py_TYPE(op) = tp; in PyObject_Init()
235 Py_TYPE(op) = tp; in PyObject_InitVar()
300 else if (Py_TYPE(op)->tp_print == NULL) { in internal_print()
315 ret = (*Py_TYPE(op)->tp_print)(op, fp, flags); in internal_print()
357 Py_TYPE(op)==NULL ? "NULL" : Py_TYPE(op)->tp_name, in _PyObject_Dump()
376 else if (Py_TYPE(v)->tp_repr == NULL) in PyObject_Repr()
378 Py_TYPE(v)->tp_name, v); in PyObject_Repr()
385 res = (*Py_TYPE(v)->tp_repr)(v); in PyObject_Repr()
403 Py_TYPE(res)->tp_name); in PyObject_Repr()
428 if (Py_TYPE(v)->tp_str == NULL) in _PyObject_Str()
[all …]
Dweakrefobject.c109 Py_TYPE(self)->tp_free(self); in weakref_dealloc()
176 Py_TYPE(PyWeakref_GET_OBJECT(self))->tp_name, in weakref_repr()
184 Py_TYPE(PyWeakref_GET_OBJECT(self))->tp_name, in weakref_repr()
199 if ((op != Py_EQ && op != Py_NE) || Py_TYPE(self) != Py_TYPE(other)) { in weakref_richcompare()
289 if (!PyType_SUPPORTS_WEAKREFS(Py_TYPE(ob))) { in weakref___new__()
292 Py_TYPE(ob)->tp_name); in weakref___new__()
471 Py_TYPE(PyWeakref_GET_OBJECT(proxy))->tp_name, in WRAP_BINARY()
764 if (!PyType_SUPPORTS_WEAKREFS(Py_TYPE(ob))) { in PyWeakref_NewRef()
767 Py_TYPE(ob)->tp_name); in PyWeakref_NewRef()
823 if (!PyType_SUPPORTS_WEAKREFS(Py_TYPE(ob))) { in PyWeakref_NewProxy()
[all …]
Dtypeobject.c263 type->tp_name, Py_TYPE(value)->tp_name); in type_set_name()
462 type->tp_name, Py_TYPE(value)->tp_name); in type_set_bases()
477 type->tp_name, Py_TYPE(ob)->tp_name); in type_set_bases()
602 else if (Py_TYPE(result)->tp_descr_get) { in type_get_doc()
603 result = Py_TYPE(result)->tp_descr_get(result, NULL, in type_get_doc()
664 Py_TYPE(v)->tp_compare || Py_TYPE(w)->tp_compare) { in type_richcompare()
841 type = Py_TYPE(self); in subtype_traverse()
898 type = Py_TYPE(self); in subtype_clear()
928 type = Py_TYPE(self); in subtype_dealloc()
956 type = Py_TYPE(self); in subtype_dealloc()
[all …]
/external/python/cpython3/Include/cpython/
Dobjimpl.h42 (PyType_IS_GC(Py_TYPE(o)) \
43 && (Py_TYPE(o)->tp_is_gc == NULL || Py_TYPE(o)->tp_is_gc(o)))
109 ((PyObject **) (((char *) (o)) + Py_TYPE(o)->tp_weaklistoffset))
/external/python/cpython2/Modules/_io/
Dstringio.c236 Py_TYPE(arg)->tp_name); in stringio_read()
306 Py_TYPE(arg)->tp_name); in stringio_readline()
320 if (Py_TYPE(self) == &PyStringIO_Type) { in stringio_iternext()
331 "not '%.200s'", Py_TYPE(line)->tp_name); in stringio_iternext()
378 Py_TYPE(arg)->tp_name); in stringio_truncate()
468 Py_TYPE(obj)->tp_name); in stringio_write()
528 Py_TYPE(self)->tp_free(self); in stringio_dealloc()
575 Py_TYPE(value)->tp_name); in stringio_init()
724 Py_TYPE(self)->tp_name, Py_TYPE(state)->tp_name); in stringio_setstate()
760 Py_TYPE(position_obj)->tp_name); in stringio_setstate()
[all …]
Dbytesio.c250 Py_TYPE(arg)->tp_name); in bytesio_read()
319 Py_TYPE(arg)->tp_name); in bytesio_readline()
365 Py_TYPE(arg)->tp_name); in bytesio_readlines()
457 Py_TYPE(arg)->tp_name); in bytesio_truncate()
686 Py_TYPE(self)->tp_name, Py_TYPE(state)->tp_name); in bytesio_setstate()
708 Py_TYPE(position_obj)->tp_name); in bytesio_setstate()
727 Py_TYPE(dict)->tp_name); in bytesio_setstate()
757 Py_TYPE(self)->tp_free(self); in bytesio_dealloc()
813 res = _PyObject_SIZE(Py_TYPE(self)); in bytesio_sizeof()

12345678910>>...14