bpo-45459: C API uses type names rather than structure names (GH-31528)

Thanks to the new pytypedefs.h, it becomes to use type names like
PyObject rather like structure names like "struct _object".
This commit is contained in:
Victor Stinner 2022-02-24 17:51:59 +01:00 committed by GitHub
parent ec091bd47e
commit 042f31da55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 69 additions and 75 deletions

View file

@ -283,7 +283,7 @@ _PyImport_IsInitialized(PyInterpreterState *interp)
}
PyObject *
_PyImport_GetModuleId(struct _Py_Identifier *nameid)
_PyImport_GetModuleId(_Py_Identifier *nameid)
{
PyObject *name = _PyUnicode_FromId(nameid); /* borrowed */
if (name == NULL) {

View file

@ -862,7 +862,7 @@ _PyThreadState_SetCurrent(PyThreadState *tstate)
}
PyObject*
PyState_FindModule(struct PyModuleDef* module)
PyState_FindModule(PyModuleDef* module)
{
Py_ssize_t index = module->m_base.m_index;
PyInterpreterState *state = _PyInterpreterState_GET();
@ -881,7 +881,7 @@ PyState_FindModule(struct PyModuleDef* module)
}
int
_PyState_AddModule(PyThreadState *tstate, PyObject* module, struct PyModuleDef* def)
_PyState_AddModule(PyThreadState *tstate, PyObject* module, PyModuleDef* def)
{
if (!def) {
assert(_PyErr_Occurred(tstate));
@ -914,7 +914,7 @@ _PyState_AddModule(PyThreadState *tstate, PyObject* module, struct PyModuleDef*
}
int
PyState_AddModule(PyObject* module, struct PyModuleDef* def)
PyState_AddModule(PyObject* module, PyModuleDef* def)
{
if (!def) {
Py_FatalError("module definition is NULL");
@ -935,7 +935,7 @@ PyState_AddModule(PyObject* module, struct PyModuleDef* def)
}
int
PyState_RemoveModule(struct PyModuleDef* def)
PyState_RemoveModule(PyModuleDef* def)
{
PyThreadState *tstate = _PyThreadState_GET();
PyInterpreterState *interp = tstate->interp;