]> git.draconx.ca Git - gob-dx.git/commitdiff
Rename "prealloc" global variable.
authorNick Bowler <nbowler@draconx.ca>
Fri, 25 Feb 2022 04:06:09 +0000 (23:06 -0500)
committerNick Bowler <nbowler@draconx.ca>
Fri, 25 Feb 2022 04:41:26 +0000 (23:41 -0500)
HP-UX 11 has a function called "prealloc" in its C library which causes
conflicts with this global variable.  Let's pick a different name.

src/lexer.l
src/main.c
src/main.h

index 3e57e8ab3ca1a3701d9c7a2a20ff9ea65e7d2d41..d33965db2119190c474205bc44ddaafbb210bff8 100644 (file)
@@ -660,7 +660,7 @@ flags               { return FLAGS; }
                        p = strchr (yytext,'p');
                        g_assert (p); /* we MUST have found it */
                        sscanf (p, "prealloc %d", &t);
-                       prealloc=t;
+                       npreallocs=t;
                }
 
 %%
index 4aea007800c761d77af255e9996f38c33348b01e..73920ae0727f04ee1418438087e6f3335875b662 100644 (file)
@@ -133,11 +133,7 @@ gboolean no_lines = FALSE;
 gboolean no_self_alias = FALSE;
 gboolean always_private_struct = FALSE;
 gboolean gtk3_ok = FALSE;
-
-gint prealloc = 0;
-
-
-
+gint npreallocs = 0;
 gboolean use_m4 = FALSE; /* preprocess sources with m4 */
 char *m4_commandline = NULL;
 #define M4_INCLUDE_DIR  PKGDATADIR "/m4"
@@ -1269,7 +1265,7 @@ static void add_type_info(void)
                        "\t\t(GInstanceInitFunc) %s_init,\n"
                        "\t\tNULL\n"
                        "\t};\n\n",
-                       typebase, funcbase, typebase, prealloc, funcbase);
+                       typebase, funcbase, typebase, npreallocs, funcbase);
 }
 
 static void
index 6c902507b31e05bc25c75fd4c3d6f3d92a11eafc..66197dc392b8a460b72c19134a9981ddc224c89f 100644 (file)
@@ -43,7 +43,7 @@ extern gboolean no_self_alias;
 extern gboolean no_kill_underscores;
 extern gboolean always_private_struct;
 extern gboolean gtk3_ok;
-extern gint prealloc;
+extern gint npreallocs;
 
 extern char *filename;
 extern char *filebase;