Lines Matching refs:PyObject

40 Objects are always accessed through pointers of the type 'PyObject *'.
41 The type 'PyObject' is a structure that only contains the reference count
66 PyObject *_ob_next; \
67 PyObject *_ob_prev;
76 /* PyObject_HEAD defines the initial segment of every PyObject. */
77 #define PyObject_HEAD PyObject ob_base;
95 /* Nothing is actually declared to be a PyObject, but every pointer to
96 * a Python object can be cast to a PyObject*. This is inheritance built
106 /* Cast argument to PyObject* type. */
107 #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op))
110 PyObject ob_base;
119 PyAPI_FUNC(int) Py_Is(PyObject *x, PyObject *y);
123 static inline Py_ssize_t Py_REFCNT(PyObject *ob) {
132 static inline PyTypeObject* Py_TYPE(PyObject *ob) {
140 static inline Py_ssize_t Py_SIZE(PyObject *ob) {
149 static inline int Py_IS_TYPE(PyObject *ob, PyTypeObject *type) {
157 static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
165 static inline void Py_SET_TYPE(PyObject *ob, PyTypeObject *type) {
196 typedef PyObject * (*unaryfunc)(PyObject *);
197 typedef PyObject * (*binaryfunc)(PyObject *, PyObject *);
198 typedef PyObject * (*ternaryfunc)(PyObject *, PyObject *, PyObject *);
199 typedef int (*inquiry)(PyObject *);
200 typedef Py_ssize_t (*lenfunc)(PyObject *);
201 typedef PyObject *(*ssizeargfunc)(PyObject *, Py_ssize_t);
202 typedef PyObject *(*ssizessizeargfunc)(PyObject *, Py_ssize_t, Py_ssize_t);
203 typedef int(*ssizeobjargproc)(PyObject *, Py_ssize_t, PyObject *);
204 typedef int(*ssizessizeobjargproc)(PyObject *, Py_ssize_t, Py_ssize_t, PyObject *);
205 typedef int(*objobjargproc)(PyObject *, PyObject *, PyObject *);
207 typedef int (*objobjproc)(PyObject *, PyObject *);
208 typedef int (*visitproc)(PyObject *, void *);
209 typedef int (*traverseproc)(PyObject *, visitproc, void *);
213 typedef void (*destructor)(PyObject *);
214 typedef PyObject *(*getattrfunc)(PyObject *, char *);
215 typedef PyObject *(*getattrofunc)(PyObject *, PyObject *);
216 typedef int (*setattrfunc)(PyObject *, char *, PyObject *);
217 typedef int (*setattrofunc)(PyObject *, PyObject *, PyObject *);
218 typedef PyObject *(*reprfunc)(PyObject *);
219 typedef Py_hash_t (*hashfunc)(PyObject *);
220 typedef PyObject *(*richcmpfunc) (PyObject *, PyObject *, int);
221 typedef PyObject *(*getiterfunc) (PyObject *);
222 typedef PyObject *(*iternextfunc) (PyObject *);
223 typedef PyObject *(*descrgetfunc) (PyObject *, PyObject *, PyObject *);
224 typedef int (*descrsetfunc) (PyObject *, PyObject *, PyObject *);
225 typedef int (*initproc)(PyObject *, PyObject *, PyObject *);
226 typedef PyObject *(*newfunc)(PyTypeObject *, PyObject *, PyObject *);
227 typedef PyObject *(*allocfunc)(PyTypeObject *, Py_ssize_t);
242 PyAPI_FUNC(PyObject*) PyType_FromSpec(PyType_Spec*);
244 PyAPI_FUNC(PyObject*) PyType_FromSpecWithBases(PyType_Spec*, PyObject*);
250 PyAPI_FUNC(PyObject*) PyType_FromModuleAndSpec(PyObject *, PyType_Spec *, PyObject *);
251 PyAPI_FUNC(PyObject *) PyType_GetModule(PyTypeObject *);
255 PyAPI_FUNC(PyObject *) PyType_GetName(PyTypeObject *);
256 PyAPI_FUNC(PyObject *) PyType_GetQualName(PyTypeObject *);
262 static inline int PyObject_TypeCheck(PyObject *ob, PyTypeObject *type) {
276 PyAPI_FUNC(PyObject *) PyType_GenericAlloc(PyTypeObject *, Py_ssize_t);
277 PyAPI_FUNC(PyObject *) PyType_GenericNew(PyTypeObject *,
278 PyObject *, PyObject *);
283 PyAPI_FUNC(PyObject *) PyObject_Repr(PyObject *);
284 PyAPI_FUNC(PyObject *) PyObject_Str(PyObject *);
285 PyAPI_FUNC(PyObject *) PyObject_ASCII(PyObject *);
286 PyAPI_FUNC(PyObject *) PyObject_Bytes(PyObject *);
287 PyAPI_FUNC(PyObject *) PyObject_RichCompare(PyObject *, PyObject *, int);
288 PyAPI_FUNC(int) PyObject_RichCompareBool(PyObject *, PyObject *, int);
289 PyAPI_FUNC(PyObject *) PyObject_GetAttrString(PyObject *, const char *);
290 PyAPI_FUNC(int) PyObject_SetAttrString(PyObject *, const char *, PyObject *);
291 PyAPI_FUNC(int) PyObject_HasAttrString(PyObject *, const char *);
292 PyAPI_FUNC(PyObject *) PyObject_GetAttr(PyObject *, PyObject *);
293 PyAPI_FUNC(int) PyObject_SetAttr(PyObject *, PyObject *, PyObject *);
294 PyAPI_FUNC(int) PyObject_HasAttr(PyObject *, PyObject *);
295 PyAPI_FUNC(PyObject *) PyObject_SelfIter(PyObject *);
296 PyAPI_FUNC(PyObject *) PyObject_GenericGetAttr(PyObject *, PyObject *);
297 PyAPI_FUNC(int) PyObject_GenericSetAttr(PyObject *, PyObject *, PyObject *);
299 PyAPI_FUNC(int) PyObject_GenericSetDict(PyObject *, PyObject *, void *);
301 PyAPI_FUNC(Py_hash_t) PyObject_Hash(PyObject *);
302 PyAPI_FUNC(Py_hash_t) PyObject_HashNotImplemented(PyObject *);
303 PyAPI_FUNC(int) PyObject_IsTrue(PyObject *);
304 PyAPI_FUNC(int) PyObject_Not(PyObject *);
305 PyAPI_FUNC(int) PyCallable_Check(PyObject *);
306 PyAPI_FUNC(void) PyObject_ClearWeakRefs(PyObject *);
313 PyAPI_FUNC(PyObject *) PyObject_Dir(PyObject *);
317 PyAPI_FUNC(PyObject *) _PyObject_GetState(PyObject *);
322 PyAPI_FUNC(int) Py_ReprEnter(PyObject *);
323 PyAPI_FUNC(void) Py_ReprLeave(PyObject *);
474 PyObject *op);
477 PyAPI_FUNC(void) _Py_Dealloc(PyObject *);
483 PyAPI_FUNC(void) Py_IncRef(PyObject *);
484 PyAPI_FUNC(void) Py_DecRef(PyObject *);
488 PyAPI_FUNC(void) _Py_IncRef(PyObject *);
489 PyAPI_FUNC(void) _Py_DecRef(PyObject *);
491 static inline void Py_INCREF(PyObject *op)
498 // directly PyObject.ob_refcnt.
512 static inline void Py_DECREF(PyObject *op) {
518 static inline void Py_DECREF(const char *filename, int lineno, PyObject *op)
533 static inline void Py_DECREF(PyObject *op)
536 // directly PyObject.ob_refcnt.
581 PyObject *_py_tmp = _PyObject_CAST(op); \
589 static inline void Py_XINCREF(PyObject *op)
599 static inline void Py_XDECREF(PyObject *op)
611 PyAPI_FUNC(PyObject*) Py_NewRef(PyObject *obj);
614 PyAPI_FUNC(PyObject*) Py_XNewRef(PyObject *obj);
616 static inline PyObject* _Py_NewRef(PyObject *obj)
622 static inline PyObject* _Py_XNewRef(PyObject *obj)
646 PyAPI_DATA(PyObject) _Py_NoneStruct; /* Don't use this directly */
650 PyAPI_FUNC(int) Py_IsNone(PyObject *x);
660 PyAPI_DATA(PyObject) _Py_NotImplementedStruct; /* Don't use this directly */
777 static inline int PyType_Check(PyObject *op) {
787 static inline int PyType_CheckExact(PyObject *op) {