[v2,9/9] Remove a useless Guile finalizer

Message ID 1397731588-23750-10-git-send-email-wingo@igalia.com
State Committed
Headers

Commit Message

Andy Wingo April 17, 2014, 10:46 a.m. UTC
  gdb/ChangeLog:
	* guile/scm-symtab.c (stscm_free_sal_smob): Remove useless free
	function.  (This was the only useless free function.)
---
 gdb/ChangeLog          |  5 +++++
 gdb/guile/scm-symtab.c | 14 --------------
 2 files changed, 5 insertions(+), 14 deletions(-)
  

Comments

Doug Evans April 27, 2014, 12:40 a.m. UTC | #1
Andy Wingo <wingo@igalia.com> writes:

> gdb/ChangeLog:
> 	* guile/scm-symtab.c (stscm_free_sal_smob): Remove useless free
> 	function.  (This was the only useless free function.)

LGTM
  
Doug Evans May 27, 2014, 7:48 a.m. UTC | #2
Doug Evans <xdje42@gmail.com> writes:

> Andy Wingo <wingo@igalia.com> writes:
>
>> gdb/ChangeLog:
>> 	* guile/scm-symtab.c (stscm_free_sal_smob): Remove useless free
>> 	function.  (This was the only useless free function.)
>
> LGTM

I committed 7,8,9 as a unit.

Thanks!
  

Patch

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 4f869db..e408e2e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@ 
 2014-04-17  Andy Wingo  <wingo@igalia.com>
 
+	* guile/scm-symtab.c (stscm_free_sal_smob): Remove useless free
+	function.  (This was the only useless free function.)
+
+2014-04-17  Andy Wingo  <wingo@igalia.com>
+
 	* guile/scm-breakpoint.c (bpscm_mark_breakpoint_smob):
 	* guile/scm-exception.c (exscm_mark_exception_smob):
 	* guile/scm-iterator.c (itscm_mark_iterator_smob):
diff --git a/gdb/guile/scm-symtab.c b/gdb/guile/scm-symtab.c
index 8910973..876bf64 100644
--- a/gdb/guile/scm-symtab.c
+++ b/gdb/guile/scm-symtab.c
@@ -386,19 +386,6 @@  gdbscm_symtab_static_block (SCM self)
 
 /* Administrivia for sal (symtab-and-line) smobs.  */
 
-/* The smob "free" function for <gdb:sal>.  */
-
-static size_t
-stscm_free_sal_smob (SCM self)
-{
-  sal_smob *s_smob = (sal_smob *) SCM_SMOB_DATA (self);
-
-  /* Not necessary, done to catch bugs.  */
-  s_smob->symtab_scm = SCM_UNDEFINED;
-
-  return 0;
-}
-
 /* The smob "print" function for <gdb:sal>.  */
 
 static int
@@ -692,7 +679,6 @@  gdbscm_initialize_symtabs (void)
   scm_set_smob_print (symtab_smob_tag, stscm_print_symtab_smob);
 
   sal_smob_tag = gdbscm_make_smob_type (sal_smob_name, sizeof (sal_smob));
-  scm_set_smob_free (sal_smob_tag, stscm_free_sal_smob);
   scm_set_smob_print (sal_smob_tag, stscm_print_sal_smob);
 
   gdbscm_define_functions (symtab_functions, 1);