mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Two new public API functions, Py_IncRef and Py_DecRef. Useful for
dynamic embedders of Python.
This commit is contained in:
parent
1a9d32b8d4
commit
1328b52c6f
4 changed files with 28 additions and 0 deletions
|
@ -624,6 +624,13 @@ PyAPI_FUNC(void) _Py_AddToAllObjects(PyObject *, int force);
|
|||
#define Py_XINCREF(op) if ((op) == NULL) ; else Py_INCREF(op)
|
||||
#define Py_XDECREF(op) if ((op) == NULL) ; else Py_DECREF(op)
|
||||
|
||||
/*
|
||||
These are provided as conveniences to Python runtime embedders, so that
|
||||
they can have object code that is not dependent on Python compilation flags.
|
||||
*/
|
||||
PyAPI_FUNC(void) Py_IncRef(PyObject *);
|
||||
PyAPI_FUNC(void) Py_DecRef(PyObject *);
|
||||
|
||||
/*
|
||||
_Py_NoneStruct is an object of undefined type which can be used in contexts
|
||||
where NULL (nil) is not suitable (since NULL often means 'error').
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue