/[m4]/m4/m4/symtab.c
ViewVC logotype

Diff of /m4/m4/symtab.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.31 by gary, Fri Jun 6 16:14:05 2003 UTC revision 1.32 by gary, Tue Jun 10 11:51:08 2003 UTC
# Line 46  Line 46 
46    
47  static int      m4_symbol_destroy       (const void *name, void *symbol,  static int      m4_symbol_destroy       (const void *name, void *symbol,
48                                           void *symtab);                                           void *symtab);
49  static int      m4_arg_destroy          (const void *ignored, void *arg,  static int      m4_arg_destroy          (const void *name, void *arg,
50                                           void *also_ignored);                                           void *arg_signature);
51    
52  /* Pointer to symbol table.  */  /* Pointer to symbol table.  */
53  m4_hash *m4_symtab = 0;  m4_hash *m4_symtab = 0;
# Line 220  m4_symbol_popdef (const char *name) Line 220  m4_symbol_popdef (const char *name)
220        if (TOKEN_ARG_SIGNATURE (stale))        if (TOKEN_ARG_SIGNATURE (stale))
221          {          {
222            m4_hash_apply (TOKEN_ARG_SIGNATURE (stale),            m4_hash_apply (TOKEN_ARG_SIGNATURE (stale),
223                           m4_arg_destroy, NULL);                           m4_arg_destroy, TOKEN_ARG_SIGNATURE (stale));
224            m4_hash_delete (TOKEN_ARG_SIGNATURE (stale));            m4_hash_delete (TOKEN_ARG_SIGNATURE (stale));
225          }          }
226        if (TOKEN_TYPE (stale) == M4_TOKEN_TEXT)        if (TOKEN_TYPE (stale) == M4_TOKEN_TEXT)
# Line 250  m4_symbol_delete (const char *name) Line 250  m4_symbol_delete (const char *name)
250  /* Callback used by m4_symbol_popdef () to release the memory used  /* Callback used by m4_symbol_popdef () to release the memory used
251     by values in the arg_signature hash.  */     by values in the arg_signature hash.  */
252  static int  static int
253  m4_arg_destroy (const void *ignored, void *arg, void *also_ignored)  m4_arg_destroy (const void *name, void *arg, void *arg_signature)
254  {  {
255    struct m4_token_arg *token_arg = (struct m4_token_arg *) arg;    struct m4_token_arg *token_arg = (struct m4_token_arg *) arg;
256    
257      assert (name);
258      assert (arg_signature);
259    
260    if (TOKEN_ARG_DEFAULT (token_arg))    if (TOKEN_ARG_DEFAULT (token_arg))
261      XFREE (TOKEN_ARG_DEFAULT (token_arg));      XFREE (TOKEN_ARG_DEFAULT (token_arg));
262    xfree (arg);    xfree (token_arg);
263      xfree (m4_hash_remove ((m4_hash *) arg_signature, (const char *) name));
264    
265    return 0;    return 0;
266  }  }

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.32

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26