m4-patches
[Top][All Lists]
Advanced

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

FYI: 12-gary-module-api-refactor-module-data.patch


From: Gary V. Vaughan
Subject: FYI: 12-gary-module-api-refactor-module-data.patch
Date: Mon, 16 Jun 2003 17:34:59 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030529

Applied to HEAD.
--
  ())_.  Gary V. Vaughan    gary@(oranda.demon.co.uk|gnu.org)
  ( '/   Research Scientist http://www.oranda.demon.co.uk       ,_())____
  / )=   GNU Hacker         http://www.gnu.org/software/libtool  \'      `&
`(_~)_   Tech' Author       http://sources.redhat.com/autobook   =`---d__/
Index: ChangeLog
from  Gary V. Vaughan  <address@hidden>
        Further refactoring to stabilise the module API.  Renaming some
        functions for orthogonality, and judicious definition migration to
        move things out of the set of exported symbols.

        * doc/STYLE: New file.  Notes on coding style.
        * m4/m4module.c: Updated bitrotted docucomment at the top of the
        file.
        (m4_module_name, m4_module_builtins, m4_module_macros): Renamed to
        m4_get_module_name, m4_get_module_builtin_table,
        m4_get_module_macro_table which are verb phrases.  Changed all
        callers.
        * m4/builtin.c (m4_builtin_table_install, m4_macro_table_install):
        Moved to...
        * m4/module.c (m4_set_module_builtin_table)
        (m4_set_module_macro_table): ...here, and renamed. Changed all
        callers.
        * m4/m4module.c (m4_module_data): This...
        * m4/m4private.c (struct m4_module_data): ...and this...
        * m4/module.c (module_data) ...consolidated here and no longer
        exported.  Changed all callers.

2003-06-16  Gary V. Vaughan  <address@hidden>

        least in the areas that impact the ABI.  An interrelated change
Index: m4/builtin.c
===================================================================
RCS file: /cvsroot/m4/m4/m4/builtin.c,v
retrieving revision 1.18
diff -u -p -u -r1.18 builtin.c
--- m4/builtin.c 16 Jun 2003 10:43:45 -0000 1.18
+++ m4/builtin.c 16 Jun 2003 16:28:27 -0000
@@ -38,7 +38,7 @@ m4_builtin_find_by_name (const m4_builti
 
   while ((handle = lt_dlhandle_next (handle)))
     {
-      m4_builtin *builtin = m4_module_builtins (handle);
+      m4_builtin *builtin = m4_get_module_builtin_table (handle);
 
       if (builtin && (bp == NULL || bp == builtin))
        {
@@ -58,7 +58,7 @@ m4_builtin_find_by_func (const m4_builti
 
   while ((handle = lt_dlhandle_next (handle)))
     {
-      m4_builtin *builtin = m4_module_builtins (handle);
+      m4_builtin *builtin = m4_get_module_builtin_table (handle);
 
       if (builtin && (bp == NULL || bp == builtin))
        {
@@ -197,66 +197,4 @@ m4_arg_signature_parse (const char *name
             _("Warning: %s: unterminated parameter list"), name));
 
   return arg_signature;
-}
-
-void
-m4_builtin_table_install (m4 *context, lt_dlhandle handle,
-                         const m4_builtin *table)
-{
-  const m4_builtin *bp;
-  m4_token token;
-
-  assert (handle);
-  assert (table);
-
-  bzero (&token, sizeof (m4_token));
-  TOKEN_TYPE (&token)          = M4_TOKEN_FUNC;
-  TOKEN_HANDLE (&token)                = handle;
-
-  for (bp = table; bp->name != NULL; bp++)
-    {
-      int flags = 0;
-      char *name;
-
-      if (prefix_all_builtins)
-       {
-         static const char prefix[] = "m4_";
-         size_t len = strlen (prefix) + strlen (bp->name);
-
-         name = (char *) xmalloc (1+ len);
-         snprintf (name, 1+ len, "%s%s", prefix, bp->name);
-       }
-      else
-       name = (char *) bp->name;
-
-      if (bp->groks_macro_args) BIT_SET (flags, TOKEN_MACRO_ARGS_BIT);
-      if (bp->blind_if_no_args) BIT_SET (flags, TOKEN_BLIND_ARGS_BIT);
-
-      TOKEN_FUNC (&token)      = bp->func;
-      TOKEN_FLAGS (&token)     = flags;
-      TOKEN_MIN_ARGS (&token)  = bp->min_args;
-      TOKEN_MAX_ARGS (&token)  = bp->max_args;
-
-      m4_builtin_pushdef (context, name, &token);
-
-      if (prefix_all_builtins)
-       xfree (name);
-    }
-}
-
-void
-m4_macro_table_install (m4 *context, lt_dlhandle handle, const m4_macro *table)
-{
-  const m4_macro *mp;
-  m4_token token;
-
-  bzero (&token, sizeof (m4_token));
-  TOKEN_TYPE (&token)          = M4_TOKEN_TEXT;
-  TOKEN_HANDLE (&token)                = handle;
-
-  for (mp = table; mp->name != NULL; mp++)
-    {
-      TOKEN_TEXT (&token)      = (char *) mp->value;
-      m4_macro_pushdef (context, mp->name, &token);
-    }
 }
Index: m4/m4module.h
===================================================================
RCS file: /cvsroot/m4/m4/m4/m4module.h,v
retrieving revision 1.46
diff -u -p -u -r1.46 m4module.h
--- m4/m4module.h 16 Jun 2003 10:43:45 -0000 1.46
+++ m4/m4module.h 16 Jun 2003 16:28:27 -0000
@@ -31,7 +31,6 @@ BEGIN_C_DECLS
 /* Various declarations.  */
 
 typedef struct m4              m4;
-typedef struct m4_module_data  m4_module_data;
 typedef struct m4_symbol       m4_symbol;
 typedef struct m4_token                m4_token;
 typedef struct m4_hash         m4_symtab;
@@ -76,9 +75,9 @@ typedef void m4_module_finish_func (m4 *
 extern lt_dlhandle  m4_module_load   (m4 *, const char*, struct obstack*);
 extern void        m4_module_unload (m4 *, const char*, struct obstack*);
 
-extern const char  *m4_module_name     (lt_dlhandle);
-extern m4_builtin  *m4_module_builtins (lt_dlhandle);
-extern m4_macro           *m4_module_macros   (lt_dlhandle);
+extern const char  *m4_get_module_name     (lt_dlhandle);
+extern m4_builtin  *m4_get_module_builtin_table (lt_dlhandle);
+extern m4_macro           *m4_get_module_macro_table   (lt_dlhandle);
 
 
 /* --- SYMBOL TABLE MANAGEMENT --- */
@@ -132,9 +131,9 @@ extern m4_symbol *m4_symbol_set_token (m
                        m4_symbol *(*getter) (m4_symtab *, const char *),
                        m4_symbol *(*setter) (m4_symbol *, m4_token *));
 
-extern void      m4_macro_table_install   (m4 *context, lt_dlhandle handle,
+extern void      m4_set_module_macro_table   (m4 *context, lt_dlhandle handle,
                                            const m4_macro *table);
-extern void      m4_builtin_table_install (m4 *context, lt_dlhandle handle,
+extern void      m4_set_module_builtin_table (m4 *context, lt_dlhandle handle,
                                            const m4_builtin *table);
 
 extern const m4_builtin *m4_builtin_find_by_name (
Index: m4/m4private.h
===================================================================
RCS file: /cvsroot/m4/m4/m4/m4private.h,v
retrieving revision 1.21
diff -u -p -u -r1.21 m4private.h
--- m4/m4private.h 16 Jun 2003 10:43:45 -0000 1.21
+++ m4/m4private.h 16 Jun 2003 16:28:27 -0000
@@ -72,11 +72,6 @@ extern boolean m4__single_comments;
 /* TRUE iff some character has M4_SYNTAX_ESCAPE */
 extern boolean m4__use_macro_escape;
 
-struct m4_module_data {
-  m4_builtin       *bp;        /* `m4_builtin_table' address */
-  m4_macro         *mp;        /* `m4_macro_table' address */
-};
-
 struct m4_token_arg {
   int          index;
   int          flags;
Index: m4/module.c
===================================================================
RCS file: /cvsroot/m4/m4/m4/module.c,v
retrieving revision 1.19
diff -u -p -u -r1.19 module.c
--- m4/module.c 16 Jun 2003 10:43:45 -0000 1.19
+++ m4/module.c 16 Jun 2003 16:28:27 -0000
@@ -1,5 +1,5 @@
 /* GNU m4 -- A simple macro processor
-   Copyright 1989-1994, 1998, 99 Free Software Foundation, Inc.
+   Copyright 1989-1994, 1998, 1999, 2002, 2003 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
@@ -30,17 +30,18 @@
  * compiled shared object, that can be loaded into GNU M4 at run
  * time. Information about creating modules is in ../modules/README.
  *
- * This implementation uses libltdl, which is in turn can open modules
+  * This implementation uses libltdl, which is in turn can open modules
  * using either dlopen(3) (exists on GNU/Linux, OSF, Solaris, SunOS and
  * others), shl_load(3) (exists on HPUX), LoadLibrary(3) (exists on
- * Windows, cygwin, OS/2), load_add_on(3) (exists on BeOS), and can
- * also fall back to dld_link(3) from GNU libdld or lt_dlpreload from
- * libtool if shared libraries are not available on the host machine.
+ * Windows, cygwin, OS/2), load_add_on(3) (exists on BeOS), NSAddImage
+ * (exists on MacOS) and can also fall back to dld_link(3) from GNU
+ * libdld or lt_dlpreload from libtool if shared libraries are not
+ * available on the host machine.
  *
  * An M4 module will usually define an external symbol called
  * `m4_builtin_table'.  This symbol points to a table of `m4_builtin'.
- * The table is pushed on an internal stack of builtin tables, each
- * definition therein is added to the symbol table.
+ * The table is saved as libltdl caller data and each definition therein
+ * is added to the symbol table.
  *
  * To load a module, call m4_module_load(), which uses the libltdl
  * API to find the module in the module search path.  The search
@@ -50,24 +51,23 @@
  * get the real library name (which can be system dependent), returning
  * NULL on failure or else a libtool module handle for the newly mapped
  * vm segment containing the module code.  If the module is not already
- * loaded, m4_module_load() retrieves the value of the symbol
- * `m4_builtin_table', which is installed using m4_builtin_table_install().
+ * loaded, m4_module_load() retrieves its value for the symbol
+ * `m4_builtin_table', which is installed using m4_set_module_builtin_table().
  *
  * In addition to builtin functions, you can also define static macro
  * expansions in the `m4_macro_table' symbol.  If you define this symbol
  * in your modules, it should be an array of `m4_macro's, mapping macro
  * names to the expansion text.  Any macros defined in `m4_macro_table'
- * are installed into the M4 symbol table with m4_macro_table_install().
+ * are installed into the M4 symbol table with m4_set_module_macro_table().
  *
- * Each time a module is loaded, the module function
- * "void m4_init_module (lt_dlhandle handle, struct obstack *obs)" is
- * called, if defined.  Any value stored in OBS by this function becomes
- * the expansion of the macro which called it.  Before M4 exits, all
- * modules are unloaded and the function
- * "void m4_finish_module (lt_dlhandle handle, struct obstack *obs)" is
- * called, if defined.  It is safe to load the same module several times:
- * the init and finish functions will also be called multiple times in
- * this case.
+ * Each time a module is loaded, the module function prototyped as
+ * "M4INIT_HANDLER (<module name>)" is called, if defined.  Any value
+ * stored in OBS by this function becomes the expansion of the macro
+ * which called it.  Before M4 exits, all modules are unloaded and the
+ * function prototyped as "M4FINISH_HANDLER (<module name>)" is called,
+ * if defined.  It is safe to load the same module several times: the
+ * init and finish functions will also be called multiple times in this
+ * case.
  *
  * To unload a module, use m4_module_unload(). which uses
  * m4__symtab_remove_module_references() to remove the builtins defined by
@@ -79,6 +79,11 @@
 
 #define MODULE_SELF_NAME       "!myself!"
 
+typedef struct {
+  m4_builtin    *builtin_table;
+  m4_macro     *macro_table;
+} module_data;
+
 static const char*  module_dlerror (void);
 static int         module_remove  (m4 *context, lt_dlhandle handle,
                                    struct obstack *obs);
@@ -88,7 +93,7 @@ static void       module_close   (m4 *cont
 static lt_dlcaller_id caller_id = 0;
 
 const char *
-m4_module_name (lt_dlhandle handle)
+m4_get_module_name (lt_dlhandle handle)
 {
   const lt_dlinfo *info;
 
@@ -100,27 +105,89 @@ m4_module_name (lt_dlhandle handle)
 }
 
 m4_builtin *
-m4_module_builtins (lt_dlhandle handle)
+m4_get_module_builtin_table (lt_dlhandle handle)
 {
-  m4_module_data *data;
+  module_data *data;
 
   assert (handle);
 
-  data = (m4_module_data *) lt_dlcaller_get_data (caller_id, handle);
+  data = lt_dlcaller_get_data (caller_id, handle);
 
-  return data ? data->bp : 0;
+  return data ? data->builtin_table : 0;
+}
+
+void
+m4_set_module_builtin_table (m4 *context, lt_dlhandle handle,
+                            const m4_builtin *table)
+{
+  const m4_builtin *bp;
+  m4_token token;
+
+  assert (handle);
+  assert (table);
+
+  bzero (&token, sizeof (m4_token));
+  TOKEN_TYPE (&token)          = M4_TOKEN_FUNC;
+  TOKEN_HANDLE (&token)                = handle;
+
+  for (bp = table; bp->name != NULL; bp++)
+    {
+      int flags = 0;
+      char *name;
+
+      if (prefix_all_builtins)
+       {
+         static const char prefix[] = "m4_";
+         size_t len = strlen (prefix) + strlen (bp->name);
+
+         name = (char *) xmalloc (1+ len);
+         snprintf (name, 1+ len, "%s%s", prefix, bp->name);
+       }
+      else
+       name = (char *) bp->name;
+
+      if (bp->groks_macro_args) BIT_SET (flags, TOKEN_MACRO_ARGS_BIT);
+      if (bp->blind_if_no_args) BIT_SET (flags, TOKEN_BLIND_ARGS_BIT);
+
+      TOKEN_FUNC (&token)      = bp->func;
+      TOKEN_FLAGS (&token)     = flags;
+      TOKEN_MIN_ARGS (&token)  = bp->min_args;
+      TOKEN_MAX_ARGS (&token)  = bp->max_args;
+
+      m4_builtin_pushdef (context, name, &token);
+
+      if (prefix_all_builtins)
+       xfree (name);
+    }
 }
 
 m4_macro *
-m4_module_macros (lt_dlhandle handle)
+m4_get_module_macro_table (lt_dlhandle handle)
 {
-  m4_module_data *data;
+  module_data *data;
 
   assert (handle);
 
-  data = (m4_module_data *) lt_dlcaller_get_data (caller_id, handle);
+  data = lt_dlcaller_get_data (caller_id, handle);
+
+  return data ? data->macro_table : 0;
+}
 
-  return data ? data->mp : 0;
+void
+m4_set_module_macro_table (m4 *context, lt_dlhandle handle, const m4_macro 
*table)
+{
+  const m4_macro *mp;
+  m4_token token;
+
+  bzero (&token, sizeof (m4_token));
+  TOKEN_TYPE (&token)          = M4_TOKEN_TEXT;
+  TOKEN_HANDLE (&token)                = handle;
+
+  for (mp = table; mp->name != NULL; mp++)
+    {
+      TOKEN_TEXT (&token)      = (char *) mp->value;
+      m4_macro_pushdef (context, mp->name, &token);
+    }
 }
 
 lt_dlhandle
@@ -146,22 +213,22 @@ m4_module_load (m4 *context, const char 
        }
       else if (info->ref_count == 1)
        {
-         const m4_builtin *bp  = m4_module_builtins (handle);
-         const m4_macro   *mp  = m4_module_macros (handle);
+         const m4_builtin *builtin_table       = m4_get_module_builtin_table 
(handle);
+         const m4_macro   *macro_table = m4_get_module_macro_table (handle);
 
          /* Install the macro functions.  */
-         if (bp)
+         if (builtin_table)
            {
-             m4_builtin_table_install (context, handle, bp);
+             m4_set_module_builtin_table (context, handle, builtin_table);
 #ifdef DEBUG_MODULES
              M4_DEBUG_MESSAGE1("module %s: builtins loaded", name);
 #endif /* DEBUG_MODULES */
            }
 
          /* Install the user macros. */
-         if (mp)
+         if (macro_table)
            {
-             m4_macro_table_install (context, handle, mp);
+             m4_set_module_macro_table (context, handle, macro_table);
 #ifdef DEBUG_MODULES
              M4_DEBUG_MESSAGE1("module %s: macros loaded", name);
 #endif /* DEBUG_MODULES */
@@ -182,7 +249,7 @@ m4_module_unload (m4 *context, const cha
   /* Scan the list for the first module with a matching name.  */
   while ((handle = lt_dlhandle_next (handle)))
     {
-      if (name && (strcmp (name, m4_module_name (handle)) == 0))
+      if (name && (strcmp (name, m4_get_module_name (handle)) == 0))
        break;
     }
 
@@ -284,8 +351,8 @@ m4__module_open (m4 *context, const char
 {
   lt_dlhandle          handle          = lt_dlopenext (name);
   m4_module_init_func  *init_func      = 0;
-  m4_builtin          *bp              = 0;
-  m4_macro            *mp              = 0;
+  m4_builtin          *builtin_table           = 0;
+  m4_macro            *macro_table             = 0;
 
   if (handle)
     {
@@ -295,10 +362,10 @@ m4__module_open (m4 *context, const char
 #endif
 
       /* Find the builtin table in the opened module. */
-      bp = (m4_builtin *) lt_dlsym (handle, BUILTIN_SYMBOL);
+      builtin_table = (m4_builtin *) lt_dlsym (handle, BUILTIN_SYMBOL);
 
       /* Find the macro table in the opened module. */
-      mp = (m4_macro *) lt_dlsym (handle, MACRO_SYMBOL);
+      macro_table = (m4_macro *) lt_dlsym (handle, MACRO_SYMBOL);
 
       /* Find and run any initialising function in the opened module,
         each time the module is opened.  */
@@ -320,7 +387,7 @@ m4__module_open (m4 *context, const char
                name, module_dlerror ()));
     }
 
-  if (!bp && !mp && !init_func)
+  if (!builtin_table && !macro_table && !init_func)
     {
       /* Since we don't use it here, only check for the finish hook
         if we were about to diagnose a module with no entry points.  */
@@ -339,11 +406,11 @@ m4__module_open (m4 *context, const char
 
       if (info && (info->ref_count == 1))
        {
-         m4_module_data *data  = XMALLOC (m4_module_data, 1);
-         m4_module_data *stale = 0;
+         module_data *data     = XMALLOC (module_data, 1);
+         module_data *stale    = 0;
 
-         data->bp      = bp;
-         data->mp      = mp;
+         data->builtin_table   = builtin_table;
+         data->macro_table     = macro_table;
 
          stale = lt_dlcaller_set_data (caller_id, handle, data);
 
@@ -380,7 +447,7 @@ m4__module_exit (m4 *context)
         data is required.  */
       if (info)
        {
-         m4_module_data *stale
+         module_data *stale
            = lt_dlcaller_set_data (caller_id, handle, 0);
          XFREE (stale);
        }
@@ -427,7 +494,7 @@ module_close (m4 *context, lt_dlhandle h
   assert (handle);
 
   /* Be careful when closing myself.  */
-  name = m4_module_name (handle);
+  name = m4_get_module_name (handle);
   name = xstrdup (name ? name : MODULE_SELF_NAME);
 
   /* Run any finishing function for the opened module. */
@@ -450,7 +517,7 @@ module_close (m4 *context, lt_dlhandle h
         time, be sure to release any client data memory.  */
       if (info && (info->ref_count == 1))
        {
-         m4_module_data *stale
+         module_data *stale
            = lt_dlcaller_set_data (caller_id, handle, 0);
          XFREE (stale);
        }
@@ -490,7 +557,7 @@ module_remove (m4 *context, lt_dlhandle 
   /* Be careful when closing myself.  */
   if (handle)
     {
-      name = m4_module_name (handle);
+      name = m4_get_module_name (handle);
       name = xstrdup (name ? name : MODULE_SELF_NAME);
     }
 #endif /* DEBUG_MODULES */
Index: m4/symtab.c
===================================================================
RCS file: /cvsroot/m4/m4/m4/symtab.c,v
retrieving revision 1.35
diff -u -p -u -r1.35 symtab.c
--- m4/symtab.c 16 Jun 2003 10:43:45 -0000 1.35
+++ m4/symtab.c 16 Jun 2003 16:28:27 -0000
@@ -327,7 +327,7 @@ symtab_dump (void)
       m4_token    *token       = SYMBOL_TOKEN (symbol);
       int          flags       = token ? SYMBOL_FLAGS (symbol) : 0;
       lt_dlhandle   handle     = token ? SYMBOL_HANDLE (symbol) : 0;
-      const char   *module_name        = handle ? m4_module_name (handle) : 
"NONE";
+      const char   *module_name        = handle ? m4_get_module_name (handle) 
: "NONE";
       const m4_builtin *bp;
 
       fprintf (stderr, "%10s: (%d%s) %s=",
@@ -344,7 +344,7 @@ symtab_dump (void)
            break;
 
          case M4_TOKEN_FUNC:
-           bp = m4_builtin_find_by_func (m4_module_builtins (handle),
+           bp = m4_builtin_find_by_func (m4_get_module_builtin_table (handle),
                                        SYMBOL_FUNC (symbol));
            fprintf (stderr, "<%s>",
                     bp ? bp->name : "!ERROR!");
Index: modules/load.c
===================================================================
RCS file: /cvsroot/m4/m4/modules/load.c,v
retrieving revision 1.9
diff -u -p -u -r1.9 load.c
--- modules/load.c 16 Jun 2003 10:43:45 -0000 1.9
+++ modules/load.c 16 Jun 2003 16:28:27 -0000
@@ -76,7 +76,7 @@ M4INIT_HANDLER (load)
       {
        M4ERROR ((warning_status, 0,
                  _("Warning: cannot make module `%s' resident: %s"),
-                 m4_module_name (handle), lt_dlerror ()));
+                 m4_get_module_name (handle), lt_dlerror ()));
       }
 }
 
@@ -98,7 +98,7 @@ M4BUILTIN_HANDLER (modules)
   if (handle)
     do
       {
-       m4_shipout_string (obs, m4_module_name (handle), 0, TRUE);
+       m4_shipout_string (obs, m4_get_module_name (handle), 0, TRUE);
 
        if ((handle = lt_dlhandle_next (handle)))
          obstack_1grow (obs, ',');
Index: modules/m4.c
===================================================================
RCS file: /cvsroot/m4/m4/modules/m4.c,v
retrieving revision 1.39
diff -u -p -u -r1.39 m4.c
--- modules/m4.c 16 Jun 2003 10:43:45 -0000 1.39
+++ modules/m4.c 16 Jun 2003 16:28:27 -0000
@@ -130,7 +130,7 @@ M4INIT_HANDLER (m4)
       {
        M4ERROR ((warning_status, 0,
                  _("Warning: cannot make module `%s' resident: %s"),
-                 m4_module_name (handle), lt_dlerror ()));
+                 m4_get_module_name (handle), lt_dlerror ()));
       }
 }
 
Index: src/freeze.c
===================================================================
RCS file: /cvsroot/m4/m4/src/freeze.c,v
retrieving revision 1.26
diff -u -p -u -r1.26 freeze.c
--- src/freeze.c 16 Jun 2003 10:43:45 -0000 1.26
+++ src/freeze.c 16 Jun 2003 16:28:27 -0000
@@ -107,7 +107,7 @@ void
 produce_module_dump (FILE *file, lt_dlhandle handle)
 {
   lt_dlhandle pending = handle;
-  const char *name = m4_module_name (pending);
+  const char *name = m4_get_module_name (pending);
 
   handle = lt_dlhandle_next (handle);
   if (handle)
@@ -131,7 +131,7 @@ produce_symbol_dump (FILE *file, m4_hash
       const char   *symbol_name        = (const char *) m4_hash_iterator_key 
(place);
       m4_symbol           *symbol      = m4_hash_iterator_value (place);
       lt_dlhandle   handle     = SYMBOL_HANDLE (symbol);
-      const char   *module_name        = handle ? m4_module_name (handle) : 
NULL;
+      const char   *module_name        = handle ? m4_get_module_name (handle) 
: NULL;
       const m4_builtin *bp;
 
       switch (SYMBOL_TYPE (symbol))
@@ -153,7 +153,7 @@ produce_symbol_dump (FILE *file, m4_hash
 
        case M4_TOKEN_FUNC:
          bp = m4_builtin_find_by_func
-               (m4_module_builtins (SYMBOL_HANDLE (symbol)),
+               (m4_get_module_builtin_table (SYMBOL_HANDLE (symbol)),
                 SYMBOL_FUNC (symbol));
 
          if (bp == NULL)
@@ -459,12 +459,12 @@ reload_frozen_state (m4 *context, const 
          if (number[2] > 0)
            {
              while ((handle = lt_dlhandle_next (handle)))
-               if (strcmp (m4_module_name (handle), string[2]) == 0)
+               if (strcmp (m4_get_module_name (handle), string[2]) == 0)
                  break;
 
              if (handle)
                {
-                 bt = m4_module_builtins (handle);
+                 bt = m4_get_module_builtin_table (handle);
                }
            }
 
@@ -663,7 +663,7 @@ reload_frozen_state (m4 *context, const 
 
          if (number[2] > 0)
            while ((handle = lt_dlhandle_next (handle)))
-             if (strcmp (m4_module_name (handle), string[2]) == 0)
+             if (strcmp (m4_get_module_name (handle), string[2]) == 0)
                break;
 
          bzero (&token, sizeof (m4_token));

reply via email to

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