/[bison]/bison/src/struniq.h
ViewVC logotype

Diff of /bison/src/struniq.h

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

revision 1.1 by akim, Tue Nov 12 07:55:55 2002 UTC revision 1.2 by akim, Tue Nov 12 08:05:59 2002 UTC
# Line 25  Line 25 
25  | struniq_t -- pointers to unique copies of C strings.  |  | struniq_t -- pointers to unique copies of C strings.  |
26  `------------------------------------------------------*/  `------------------------------------------------------*/
27    
28  typedef char *struniq_t;  typedef const char *struniq_t;
29    
30  /* Return the struniq for S.  */  /* Return the struniq for S.  */
31  const struniq_t struniq_new (const char *s);  const struniq_t struniq_new (const char *s);
32    
33    /* Two struniq have the same value iff they are the same.  */
34    #define STRUNIQ_EQ(S1, S2) ((S1) == (S2))
35    
36  /*--------------------------------------.  /*--------------------------------------.
37  | Initializing, destroying, debugging.  |  | Initializing, destroying, debugging.  |
38  `--------------------------------------*/  `--------------------------------------*/
# Line 37  const struniq_t struniq_new (const char Line 40  const struniq_t struniq_new (const char
40  /* Create the string table.  */  /* Create the string table.  */
41  void struniqs_new (void);  void struniqs_new (void);
42    
43    /* Die if S is not a struniq.  */
44    #define struniq_assert(S) assert (struniq_assert_p (S));
45    bool struniq_assert_p (const char *s);
46    
47  /* Free all the memory allocated for symbols.  */  /* Free all the memory allocated for symbols.  */
48  void struniqs_free (void);  void struniqs_free (void);
49    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

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