diff options
author | Thomas Heller <theller@ctypes.org> | 2004-04-22 17:23:49 (GMT) |
---|---|---|
committer | Thomas Heller <theller@ctypes.org> | 2004-04-22 17:23:49 (GMT) |
commit | 1328b52c6ff3ae128b12be49b430ce859bbd8876 (patch) | |
tree | d93fb72929188318596f8f63614721c0701e53a9 /Include | |
parent | 1a9d32b8d4611dd7c95d1dba1b5d1940cbbe3610 (diff) | |
download | cpython-1328b52c6ff3ae128b12be49b430ce859bbd8876.zip cpython-1328b52c6ff3ae128b12be49b430ce859bbd8876.tar.gz cpython-1328b52c6ff3ae128b12be49b430ce859bbd8876.tar.bz2 |
Two new public API functions, Py_IncRef and Py_DecRef. Useful for
dynamic embedders of Python.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/object.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Include/object.h b/Include/object.h index f6135ee..555d810 100644 --- a/Include/object.h +++ b/Include/object.h @@ -625,6 +625,13 @@ PyAPI_FUNC(void) _Py_AddToAllObjects(PyObject *, int force); #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'). |