m4-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Changes to m4/m4/module.c,v


From: Eric Blake
Subject: Changes to m4/m4/module.c,v
Date: Thu, 22 Jun 2006 15:41:12 +0000

CVSROOT:        /sources/m4
Module name:    m4
Changes by:     Eric Blake <ericb>      06/06/22 15:41:12

Index: m4/module.c
===================================================================
RCS file: /sources/m4/m4/m4/module.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -b -r1.35 -r1.36
--- m4/module.c 27 Oct 2005 16:04:03 -0000      1.35
+++ m4/module.c 22 Jun 2006 15:41:12 -0000      1.36
@@ -1,6 +1,6 @@
 /* GNU m4 -- A simple macro processor
-   Copyright (C) 1989-1994, 1998, 1999, 2002, 2003, 2004, 2005
-                 Free Software Foundation, Inc.
+   Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1998, 1999, 2002, 2003,
+   2004, 2005, 2006 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -91,7 +91,7 @@
 static int         m4__module_interface        (lt_dlhandle handle,
                                                 const char *id_string);
 
-static lt_dlinterface_id iface_id = 0;
+static lt_dlinterface_id iface_id = NULL;
 
 const char *
 m4_get_module_name (lt_dlhandle handle)
@@ -110,7 +110,7 @@
                  const char *symbol_name, m4_obstack *obs)
 {
   lt_dlhandle  handle          = m4__module_find (module_name);
-  lt_ptr       symbol_address  = 0;
+  lt_ptr       symbol_address  = NULL;
 
   /* Try to load the module if it is not yet available (errors are
      diagnosed by m4_module_load).  */
@@ -248,7 +248,7 @@
 void
 m4_module_unload (m4 *context, const char *name, m4_obstack *obs)
 {
-  lt_dlhandle  handle  = 0;
+  lt_dlhandle  handle  = NULL;
   int          errors  = 0;
 
   assert (context);
@@ -379,7 +379,7 @@
 m4__module_open (m4 *context, const char *name, m4_obstack *obs)
 {
   lt_dlhandle          handle          = lt_dlopenext (name);
-  m4_module_init_func *        init_func       = 0;
+  m4_module_init_func *        init_func       = NULL;
 
   assert (context);
   assert (iface_id);           /* need to have called m4__module_init */
@@ -452,6 +452,10 @@
       errors = module_remove (context, pending, 0);
     }
 
+  assert (iface_id);           /* need to have called m4__module_init */
+  lt_dlinterface_free (iface_id);
+  iface_id = NULL;
+
   if (!errors)
     errors = lt_dlexit();
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]