bpo-46613: Add PyType_GetModuleByDef to the public API (GH-31081)

* Make PyType_GetModuleByDef public (remove underscore)

Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
Petr Viktorin 2022-02-11 17:22:11 +01:00 committed by GitHub
parent e0bcfd0e4d
commit 204946986f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 56 additions and 36 deletions

View file

@ -74,7 +74,7 @@ extern struct PyModuleDef _sqlite3module;
static inline pysqlite_state *
pysqlite_get_state_by_type(PyTypeObject *tp)
{
PyObject *module = _PyType_GetModuleByDef(tp, &_sqlite3module);
PyObject *module = PyType_GetModuleByDef(tp, &_sqlite3module);
assert(module != NULL);
return pysqlite_get_state(module);
}