This patch replaces PyImport_ExtendInittab () with its limited C
API equivalent, PyImport_AppendInittab (), a convenience wrapper
around PyImport_ExtendInittab ().
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=23830
Approved-By: Tom Tromey <tom@tromey.com>
{
/* Define all internal modules. These are all imported (and thus
created) during initialization. */
- struct _inittab mods[] =
- {
- { "_gdb", init__gdb_module },
- { "_gdbevents", gdbpy_events_mod_func },
- { nullptr, nullptr }
- };
-
- if (PyImport_ExtendInittab (mods) < 0)
+ if (PyImport_AppendInittab ("_gdb", init__gdb_module) < 0
+ || PyImport_AppendInittab ("_gdbevents", gdbpy_events_mod_func) < 0)
return false;
if (!py_initialize ())