]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove some obsolete Python constants
authorTom Tromey <tom@tromey.com>
Sat, 9 Sep 2023 14:35:26 +0000 (08:35 -0600)
committerTom Tromey <tom@tromey.com>
Sun, 28 Jan 2024 17:58:16 +0000 (10:58 -0700)
The Python code has exported some constants, but they are no longer
documented, and were never useful.  This patch removes them.

gdb/python/py-symbol.c

index 2fb68377bad462de6bfec4be874de4c186ab2294..db8df891b293151e42578c06d88b75a66493bb02 100644 (file)
@@ -686,20 +686,6 @@ gdbpy_initialize_symbols (void)
 #include "sym-domains.def"
 #undef DOMAIN
 
-  /* These remain defined for compatibility, but as they were never
-     correct, they are no longer documented.  Eventually we can remove
-     them.  These exist because at one time, enum search_domain and
-     enum domain_enum_tag were combined -- but different values were
-     used differently.  Here we try to give them values that will make
-     sense if they are passed to gdb.lookup_symbol.  */
-  if (PyModule_AddIntConstant (gdb_module, "SYMBOL_VARIABLES_DOMAIN",
-                              VAR_DOMAIN) < 0
-      || PyModule_AddIntConstant (gdb_module, "SYMBOL_FUNCTIONS_DOMAIN",
-                                 VAR_DOMAIN) < 0
-      || PyModule_AddIntConstant (gdb_module, "SYMBOL_TYPES_DOMAIN",
-                                 VAR_DOMAIN) < 0)
-    return -1;
-
   return gdb_pymodule_addobject (gdb_module, "Symbol",
                                 (PyObject *) &symbol_object_type);
 }