summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorAnthony Baxter <anthonybaxter@gmail.com>2006-04-11 12:01:56 (GMT)
committerAnthony Baxter <anthonybaxter@gmail.com>2006-04-11 12:01:56 (GMT)
commit7b782b61c597a989a21a22c15ee95decf997429f (patch)
tree8a34ffd3e534d54448916a1fea9bfec7297a6996 /Parser
parent9176fc1466c8a896ab57b054bd426e63770e2cfa (diff)
downloadcpython-7b782b61c597a989a21a22c15ee95decf997429f.zip
cpython-7b782b61c597a989a21a22c15ee95decf997429f.tar.gz
cpython-7b782b61c597a989a21a22c15ee95decf997429f.tar.bz2
more low-hanging fruit to make code compile under a C++ compiler. Not
entirely happy with the two new VISIT macros in compile.c, but I couldn't see a better approach.
Diffstat (limited to 'Parser')
-rw-r--r--Parser/pgenmain.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Parser/pgenmain.c b/Parser/pgenmain.c
index 6e22e37..fc27a2c 100644
--- a/Parser/pgenmain.c
+++ b/Parser/pgenmain.c
@@ -136,7 +136,7 @@ char *
PyOS_Readline(FILE *sys_stdin, FILE *sys_stdout, char *prompt)
{
size_t n = 1000;
- char *p = PyMem_MALLOC(n);
+ char *p = (char *)PyMem_MALLOC(n);
char *q;
if (p == NULL)
return NULL;
@@ -149,7 +149,7 @@ PyOS_Readline(FILE *sys_stdin, FILE *sys_stdout, char *prompt)
n = strlen(p);
if (n > 0 && p[n-1] != '\n')
p[n-1] = '\n';
- return PyMem_REALLOC(p, n+1);
+ return (char *)PyMem_REALLOC(p, n+1);
}
/* No-nonsense fgets */