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 /Objects | |
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 'Objects')
-rw-r--r-- | Objects/object.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Objects/object.c b/Objects/object.c index ba9a1d9..22196d7 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -146,6 +146,18 @@ _Py_NegativeRefcount(const char *fname, int lineno, PyObject *op) #endif /* Py_REF_DEBUG */ +void +Py_IncRef(PyObject *o) +{ + Py_XINCREF(o); +} + +void +Py_DecRef(PyObject *o) +{ + Py_XDECREF(o); +} + PyObject * PyObject_Init(PyObject *op, PyTypeObject *tp) { |