• Kirill Smelkov's avatar
    Include: cpython.pystate: Make PyGILState_STATE definition usable (GH-2997) · 82a0ed43
    Kirill Smelkov authored
    PyGILState_STATE was added in commit 3fd6fdce (Gilnanny + pystate.pxd)
    with struct type on-purpose different from what CPython actually uses
    with the idea so that PyGILState_STATE cannot be coerced into int.
    
    However as it is, it prevents PyGILState_STATE usage:
    
    	cdef PyGILState_STATE gstate = PyGILState_Ensure()
    
    gives
    
    	Variable type 'PyGILState_STATE' is incomplete
    
    Fix it by making PyGILState_STATE a defined structure.
    82a0ed43
cpython_capi.pyx 1.29 KB