You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The times of calling Py_INCREF/Py_DECREF in extensions are ignored on windows #162828
On windows when enable --pystats, the python will only add the macro Py_STATS on itself compiling. This macro will enable Py_INCREF/Py_DECREF calling times counting. However, for the extensions, this macro is not defined by default so it is unable to be counted when calling these functions.
The conditions are:
On windows.
Full capi (no Py_LIMITED_API defined)
Use the macro Py_(X)INCREF and Py_(X)DECREF
When test 10 million times for calling Py_INCREF and Py_DECREF in extensions the counts are:
api
func
count
Full api
Py_INCREF/Py_DECREF
3/4
Full api
Py_IncRef/Py_DecRef
10,000,003/10,000,004
Limited api
Py_INCREF/Py_DECREF
10,000,003/10,000,004
Limited api
Py_IncRef/Py_DecRef
10,000,003/10,000,004
According to discussion, I think that this question can only be fixed if the pyconfig.h is generated dynamically. This is one of the feature that disabled on windows.
Activity