summaryrefslogtreecommitdiffstats
path: root/Modules/_testmultiphase.c
diff options
context:
space:
mode:
authorPetr Viktorin <encukou@gmail.com>2022-02-11 16:22:11 (GMT)
committerGitHub <noreply@github.com>2022-02-11 16:22:11 (GMT)
commit204946986feee7bc80b233350377d24d20fcb1b8 (patch)
treee66ab16090f97845e0f95f981c720954e244d102 /Modules/_testmultiphase.c
parente0bcfd0e4db193743d4bafc48d10f15ae9ed7b2b (diff)
downloadcpython-204946986feee7bc80b233350377d24d20fcb1b8.zip
cpython-204946986feee7bc80b233350377d24d20fcb1b8.tar.gz
cpython-204946986feee7bc80b233350377d24d20fcb1b8.tar.bz2
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>
Diffstat (limited to 'Modules/_testmultiphase.c')
-rw-r--r--Modules/_testmultiphase.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/_testmultiphase.c b/Modules/_testmultiphase.c
index f7bde98..4905269 100644
--- a/Modules/_testmultiphase.c
+++ b/Modules/_testmultiphase.c
@@ -136,21 +136,21 @@ _testmultiphase.StateAccessType.get_defining_module
Return the module of the defining class.
-Also tests that result of _PyType_GetModuleByDef matches defining_class's
+Also tests that result of PyType_GetModuleByDef matches defining_class's
module.
[clinic start generated code]*/
static PyObject *
_testmultiphase_StateAccessType_get_defining_module_impl(StateAccessTypeObject *self,
PyTypeObject *cls)
-/*[clinic end generated code: output=ba2a14284a5d0921 input=356f999fc16e0933]*/
+/*[clinic end generated code: output=ba2a14284a5d0921 input=d2c7245c8a9d06f8]*/
{
PyObject *retval;
retval = PyType_GetModule(cls);
if (retval == NULL) {
return NULL;
}
- assert(_PyType_GetModuleByDef(Py_TYPE(self), &def_meth_state_access) == retval);
+ assert(PyType_GetModuleByDef(Py_TYPE(self), &def_meth_state_access) == retval);
Py_INCREF(retval);
return retval;
}
@@ -160,15 +160,15 @@ _testmultiphase.StateAccessType.getmodulebydef_bad_def
cls: defining_class
-Test that result of _PyType_GetModuleByDef with a bad def is NULL.
+Test that result of PyType_GetModuleByDef with a bad def is NULL.
[clinic start generated code]*/
static PyObject *
_testmultiphase_StateAccessType_getmodulebydef_bad_def_impl(StateAccessTypeObject *self,
PyTypeObject *cls)
-/*[clinic end generated code: output=64509074dfcdbd31 input=906047715ee293cd]*/
+/*[clinic end generated code: output=64509074dfcdbd31 input=edaff09aa4788204]*/
{
- _PyType_GetModuleByDef(Py_TYPE(self), &def_nonmodule); // should raise
+ PyType_GetModuleByDef(Py_TYPE(self), &def_nonmodule); // should raise
assert(PyErr_Occurred());
return NULL;
}