Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e12eb85

Browse files
use _PyType_GetModuleState
1 parent 9083979 commit e12eb85

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Modules/_io/_iomodule.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "exports.h"
66

77
#include "pycore_moduleobject.h" // _PyModule_GetState()
8+
#include "pycore_typeobject.h" // _PyType_GetModuleState()
89
#include "structmember.h"
910

1011
/* Type specs */
@@ -161,7 +162,7 @@ get_io_state(PyObject *module)
161162
static inline _PyIO_State *
162163
get_io_state_by_cls(PyTypeObject *cls)
163164
{
164-
void *state = PyType_GetModuleState(cls);
165+
void *state = _PyType_GetModuleState(cls);
165166
assert(state != NULL);
166167
return (_PyIO_State *)state;
167168
}

0 commit comments

Comments
 (0)