lostonPy_DECREF/INCREFwhenhandlingPyList_AppendinPythonCextension

The main hint is in the docs, if it says ‘Steals a reference’ than the function basically takes ownership, if it says ‘New Reference’ than it did an INCREF for you, if nothing is said it probably does an INCREF and DECREF pair as needed.

http://stackoverflow.com/questions/10863669/lost-on-py-decref-incref-when-handling-pylist-append-in-python-c-extension

发表评论

电子邮件地址不会被公开。 必填项已用*标注