Closed M-Quadra closed 2 years ago
Fix PyModule_GetState.
PyModule_GetState
This should be C.PyModule_GetState, not C.PyModule_GetNameObject.
C.PyModule_GetState
C.PyModule_GetNameObject
In the test, assert.NotNil don' t support unsafe.Pointer(nil). It will pass the assert.
assert.NotNil
unsafe.Pointer(nil)
PyModuleDef.m_size is -1 in many modules. They will return nil after calling PyModule_GetState.
PyModuleDef.m_size
as this project will be archived soon, feel free to submit your PR to our community fork go-python/cpy3 and we'll review it.
What does this PR do?
Fix
PyModule_GetState
.Motivation
This should be
C.PyModule_GetState
, notC.PyModule_GetNameObject
.In the test,
assert.NotNil
don' t supportunsafe.Pointer(nil)
. It will pass the assert.Additional Notes
PyModuleDef.m_size
is -1 in many modules. They will return nil after callingPyModule_GetState
.