Writing a C extension - borrowed references

Chris Angelico rosuav at gmail.com
Tue Mar 20 12:38:24 EDT 2018


On Wed, Mar 21, 2018 at 3:22 AM, Tom Evans via Python-list
<python-list at python.org> wrote:
> Hi all
>
> I'm writing my first C extension for Python here, and all is going
> well. However, I was reading [1], and the author there is advocating
> Py_INCREF 'ing *every* borrowed reference.

BTW, have you looked into Cython? It's smart enough to take care of a
lot of this sort of thing for you.

ChrisA



More information about the Python-list mailing list