欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

lost on Py_DECREF/INCREF when handling PyList_Append in Python C extension 博客分类: pythonc++c pythonc 

程序员文章站 2024-03-17 23:58:34
...
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://*.com/questions/10863669/lost-on-py-decref-incref-when-handling-pylist-append-in-python-c-extension
相关标签: python c