mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-03 13:23:00 +08:00
* objfiles.c (struct objfile_data): Delete member cleanup and replace
with save, free. (register_objfile_data_with_cleanup): Delete arg cleanup and replace with save, free. All callers updated. (clear_objfile_data): Replace cleanup loop with separate save and free loops. * objfiles.h (register_objfile_data_with_cleanup): Update. * arm-tdep.c (arm_objfile_data_free): Renamed from arm_objfile_data_cleanup, all callers updated. * dwarf2read.c (dwarf2_per_objfile_free): Renamed from dwarf2_per_objfile_cleanup, all callers updated. * python/py-objfile.c (py_free_objfile): Renamed from clean_up_objfile, all callers updated. * python/py-type.c (save_objfile_types): Renamed from clean_up_objfile_types, all callers updated.
This commit is contained in:
@ -118,7 +118,7 @@ objfpy_set_printers (PyObject *o, PyObject *value, void *ignore)
|
||||
/* Clear the OBJFILE pointer in an Objfile object and remove the
|
||||
reference. */
|
||||
static void
|
||||
clean_up_objfile (struct objfile *objfile, void *datum)
|
||||
py_free_objfile (struct objfile *objfile, void *datum)
|
||||
{
|
||||
struct cleanup *cleanup;
|
||||
objfile_object *object = datum;
|
||||
@ -166,7 +166,7 @@ void
|
||||
gdbpy_initialize_objfile (void)
|
||||
{
|
||||
objfpy_objfile_data_key
|
||||
= register_objfile_data_with_cleanup (clean_up_objfile);
|
||||
= register_objfile_data_with_cleanup (NULL, py_free_objfile);
|
||||
|
||||
if (PyType_Ready (&objfile_object_type) < 0)
|
||||
return;
|
||||
|
@ -527,7 +527,7 @@ typy_str (PyObject *self)
|
||||
static const struct objfile_data *typy_objfile_data_key;
|
||||
|
||||
static void
|
||||
clean_up_objfile_types (struct objfile *objfile, void *datum)
|
||||
save_objfile_types (struct objfile *objfile, void *datum)
|
||||
{
|
||||
type_object *obj = datum;
|
||||
htab_t copied_types;
|
||||
@ -643,7 +643,7 @@ gdbpy_initialize_types (void)
|
||||
int i;
|
||||
|
||||
typy_objfile_data_key
|
||||
= register_objfile_data_with_cleanup (clean_up_objfile_types);
|
||||
= register_objfile_data_with_cleanup (save_objfile_types, NULL);
|
||||
|
||||
if (PyType_Ready (&type_object_type) < 0)
|
||||
return;
|
||||
|
Reference in New Issue
Block a user