diff options
| author | Tom Tromey <tom@tromey.com> | 2025-11-02 10:41:21 -0700 |
|---|---|---|
| committer | Tom Tromey <tom@tromey.com> | 2025-12-18 11:50:08 -0700 |
| commit | b056a39914ed08da28f18f9b6eecf44447e069de (patch) | |
| tree | 385c7cc43b3d5ef20078d3d2dbf96e026a51c280 /gdb/python/python.c | |
| parent | e3b02794ca17af6c12780ba32cb38c98e152a903 (diff) | |
| download | binutils-b056a39914ed08da28f18f9b6eecf44447e069de.tar.gz binutils-b056a39914ed08da28f18f9b6eecf44447e069de.tar.bz2 binutils-b056a39914ed08da28f18f9b6eecf44447e069de.zip | |
Don't use "module" name
In C++20, "module" is an "identifier with special meaning". While it
can be used as a variable name, it highlights as a keyword in Emacs,
and I think it's nicer to just avoid it.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32660
Diffstat (limited to 'gdb/python/python.c')
| -rw-r--r-- | gdb/python/python.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/python/python.c b/gdb/python/python.c index 0bf53cac2a9..29c8fbdb473 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -1309,17 +1309,17 @@ gdbpy_colorize (const std::string &filename, const std::string &contents, gdbpy_enter enter_py; - gdbpy_ref<> module (PyImport_ImportModule ("gdb.styling")); - if (module == nullptr) + gdbpy_ref<> mod (PyImport_ImportModule ("gdb.styling")); + if (mod == nullptr) { gdbpy_print_stack (); return {}; } - if (!PyObject_HasAttrString (module.get (), "colorize")) + if (!PyObject_HasAttrString (mod.get (), "colorize")) return {}; - gdbpy_ref<> hook (PyObject_GetAttrString (module.get (), "colorize")); + gdbpy_ref<> hook (PyObject_GetAttrString (mod.get (), "colorize")); if (hook == nullptr) { gdbpy_print_stack (); @@ -1394,17 +1394,17 @@ gdbpy_colorize_disasm (const std::string &content, gdbarch *gdbarch) gdbpy_enter enter_py; - gdbpy_ref<> module (PyImport_ImportModule ("gdb.styling")); - if (module == nullptr) + gdbpy_ref<> mod (PyImport_ImportModule ("gdb.styling")); + if (mod == nullptr) { gdbpy_print_stack (); return {}; } - if (!PyObject_HasAttrString (module.get (), "colorize_disasm")) + if (!PyObject_HasAttrString (mod.get (), "colorize_disasm")) return {}; - gdbpy_ref<> hook (PyObject_GetAttrString (module.get (), + gdbpy_ref<> hook (PyObject_GetAttrString (mod.get (), "colorize_disasm")); if (hook == nullptr) { |
