diff options
| author | Matthieu Longo <matthieu.longo@arm.com> | 2026-01-06 13:13:27 +0000 |
|---|---|---|
| committer | Matthieu Longo <matthieu.longo@arm.com> | 2026-01-28 09:41:32 +0000 |
| commit | c02c23175e47f29907a0a3af3f6e6a404bc99719 (patch) | |
| tree | 36d1551934595f8136c54d746d9bf578ffab1585 /gdb/python | |
| parent | 264a8a2236e8aa64b333a69e42a55ff8c0844f6e (diff) | |
| download | binutils-c02c23175e47f29907a0a3af3f6e6a404bc99719.tar.gz binutils-c02c23175e47f29907a0a3af3f6e6a404bc99719.tar.bz2 binutils-c02c23175e47f29907a0a3af3f6e6a404bc99719.zip | |
Python limited API: migrate PyImport_ExtendInittab
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>
Diffstat (limited to 'gdb/python')
| -rw-r--r-- | gdb/python/python.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/gdb/python/python.c b/gdb/python/python.c index 989add70d1a..79b5d24d1cf 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -2590,14 +2590,8 @@ do_start_initialization () { /* 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 ()) |
