diff options
author | Andrew Cagney <cagney@redhat.com> | 2000-05-22 09:02:23 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2000-05-22 09:02:23 +0000 |
commit | 8bc03e33b431d1eb24d0bf62bd6de8541cc8a587 (patch) | |
tree | 9b21100bd147ba7660ed8beef02555b41563366a /gdb/varobj.c | |
parent | d9d44fe4c56f9fbb4e2db06384fc6ec08aa4bfd9 (diff) | |
download | gdb-8bc03e33b431d1eb24d0bf62bd6de8541cc8a587.tar.gz |
Purge (almost) make_cleanup_func.
Diffstat (limited to 'gdb/varobj.c')
-rw-r--r-- | gdb/varobj.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/gdb/varobj.c b/gdb/varobj.c index fd6120391a4..9f80145b222 100644 --- a/gdb/varobj.c +++ b/gdb/varobj.c @@ -180,6 +180,8 @@ static struct varobj *new_root_variable PARAMS ((void)); static void free_variable PARAMS ((struct varobj * var)); +static struct cleanup *make_cleanup_free_variable (struct varobj *var); + static struct type *get_type PARAMS ((struct varobj * var)); static struct type *get_type_deref PARAMS ((struct varobj * var)); @@ -416,7 +418,7 @@ varobj_create (char *objname, /* Fill out a varobj structure for the (root) variable being constructed. */ var = new_root_variable (); - old_chain = make_cleanup ((make_cleanup_func) free_variable, var); + old_chain = make_cleanup_free_variable (var); if (expression != NULL) { @@ -1373,6 +1375,18 @@ free_variable (var) FREEIF (var); } +static void +do_free_variable_cleanup (void *var) +{ + free_variable (var); +} + +static struct cleanup * +make_cleanup_free_variable (struct varobj *var) +{ + return make_cleanup (do_free_variable_cleanup, var); +} + /* This returns the type of the variable. This skips past typedefs and returns the real type of the variable. It also dereferences pointers and references. */ |