STINNER Victor <victor.stin...@gmail.com> added the comment:

> (1) find any internal or external C function that returns a borrowed reference

Doc/data/refcounts.dat can be used for that:

PyCell_GET
PyDict_GetItem
PyDict_GetItemString
PyErr_Occurred
PyEval_GetBuiltins
PyEval_GetLocals
PyEval_GetGlobals
PyEval_GetFrame
PyFile_Name
PyFunction_GetClosure
PyFunction_GetCode
PyFunction_GetDefaults
PyFunction_GetGlobals
PyFunction_GetModule
Py_InitModule
Py_InitModule3
Py_InitModule4
PyImport_AddModule
PyImport_GetModuleDict
PyList_GET_ITEM
PyList_GetItem
PyMethod_Class
PyMethod_Function
PyMethod_GET_CLASS
PyMethod_GET_FUNCTION
PyMethod_GET_SELF
PyMethod_Self
PyModule_GetDict
PyObject_Init
PySequence_Fast_GET_ITEM
PySys_GetObject
PySys_GetXOptions
PyThreadState_GetDict
PyTuple_GET_ITEM
PyTuple_GetItem
PyWeakref_GET_OBJECT
PyWeakref_GetObject

(this list may be incomplete, it should be checked)

Not affected (always return NULL):

PyErr_NoMemory
PyErr_Set...

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14372>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to