#include "config.h" /* For Win* specific redefinition of printf c.s. */
-#include "myproto.h" /* For PROTO macro --Guido */
+#include "myproto.h" /* For Py_PROTO macro --Guido */
#include <stdio.h>
#include <assert.h>
#endif /* emacs */
-static void re_compile_initialize PROTO((void));
+static void re_compile_initialize Py_PROTO((void));
static void re_compile_initialize()
{
int a;
return ret;
}
-static int hex_char_to_decimal PROTO((int));
+static int hex_char_to_decimal Py_PROTO((int));
static int hex_char_to_decimal(ch)
int ch;
{
#undef SET_FIELDS
static void re_compile_fastmap_aux
- PROTO((char *, int, char *, char *, char *));
+ Py_PROTO((char *, int, char *, char *, char *));
static void re_compile_fastmap_aux(code, pos, visited, can_be_null, fastmap)
char *code, *visited, *can_be_null, *fastmap;
int pos;
}
}
-static int re_do_compile_fastmap PROTO((char *, int, int, char *, char *));
+static int re_do_compile_fastmap Py_PROTO((char *, int, int, char *, char *));
static int re_do_compile_fastmap(buffer, used, pos, can_be_null, fastmap)
char *buffer, *fastmap, *can_be_null;
int used, pos;
fprintf(fp, "#include \"grammar.h\"\n");
printdfas(g, fp);
printlabels(g, fp);
- fprintf(fp, "grammar gram = {\n");
+ fprintf(fp, "grammar _PyParser_Grammar = {\n");
fprintf(fp, "\t%d,\n", g->g_ndfas);
fprintf(fp, "\tdfas,\n");
fprintf(fp, "\t{%d, labels},\n", g->g_ll.ll_nlabels);
#define Py_CHARMASK(c) ((c) & 0xff)
#endif
-#include "rename2.h"
-
/* strtol and strtoul, renamed to avoid conflicts */
/*
#include <errno.h>
unsigned long
-mystrtoul(str, ptr, base)
+PyOS_strtoul(str, ptr, base)
register char * str;
char ** ptr;
int base;
}
long
-mystrtol(str, ptr, base)
+PyOS_strtol(str, ptr, base)
char * str;
char ** ptr;
int base;
if (sign == '+' || sign == '-')
str++;
- result = (long) mystrtoul(str, ptr, base);
+ result = (long) PyOS_strtoul(str, ptr, base);
/* Signal overflow if the result appears negative,
except for the largest negative integer */