mirror of
https://github.com/python/cpython.git
synced 2026-05-07 13:10:37 -04: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:
+1
-1
@@ -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) {
|
||||
|
||||
+4
-4
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user