]> git.sur5r.net Git - cc65/commitdiff
Make AUTO_STRBUF_INITIALIZER identical to STATIC_STRBUF_INITIALIZER.
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 8 Oct 2009 10:50:15 +0000 (10:50 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 8 Oct 2009 10:50:15 +0000 (10:50 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@4342 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/common/strbuf.h
src/common/strpool.c

index 4ea708071cec31e77001f27c4add2ca05e434b14..fc904a1d20f0e6eabae7b7d9a0ca61003d4750fc 100644 (file)
@@ -6,10 +6,10 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2001-2008 Ullrich von Bassewitz                                       */
-/*               Roemerstrasse 52                                            */
-/*               D-70794 Filderstadt                                         */
-/* EMail:        uz@cc65.org                                                 */
+/* (C) 2001-2009, Ullrich von Bassewitz                                      */
+/*                Roemerstrasse 52                                           */
+/*                D-70794 Filderstadt                                        */
+/* EMail:         uz@cc65.org                                                */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
@@ -69,7 +69,7 @@ extern const StrBuf EmptyStrBuf;
 #define STATIC_STRBUF_INITIALIZER      { 0, 0, 0, 0 }
 
 /* Initializer for auto string bufs */
-#define AUTO_STRBUF_INITIALIZER         EmptyStrBuf
+#define AUTO_STRBUF_INITIALIZER         { 0, 0, 0, 0 }
 
 /* Initialize with a string literal (beware: evaluates str twice!) */
 #define LIT_STRBUF_INITIALIZER(str)     { (char*)str, sizeof(str)-1, 0, 0 }
index 4bb19fcddb5ebf748317be67eadf8e496e3d342f..0387de4035e104034853055b7663b2dde6fee4d2 100644 (file)
@@ -6,10 +6,10 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2003-2008 Ullrich von Bassewitz                                       */
-/*               Roemerstrasse 52                                            */
-/*               D-70794 Filderstadt                                         */
-/* EMail:        uz@cc65.org                                                 */
+/* (C) 2003-2009, Ullrich von Bassewitz                                      */
+/*                Roemerstrasse 52                                           */
+/*                D-70794 Filderstadt                                        */
+/* EMail:         uz@cc65.org                                                */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
@@ -84,8 +84,8 @@ static StringPoolEntry* NewStringPoolEntry (const StrBuf* S, unsigned Hash, unsi
     /* Initialize the fields */
     E->Next = 0;
     E->Hash = Hash;
-    E->Id   = Id;
-    E->Buf  = AUTO_STRBUF_INITIALIZER;
+    E->Id   = Id;                                                       
+    SB_Init (&E->Buf);
     SB_Copy (&E->Buf, S);
 
     /* Always zero terminate the string */