[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Writing a C extension - borrowed references

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.