mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
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:
parent
ec091bd47e
commit
042f31da55
23 changed files with 69 additions and 75 deletions
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue