Skip to content

Commit 346da99

Browse files
author
anthony.baxter
committed
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. git-svn-id: http://svn.python.org/projects/python/trunk@45279 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent e42b708 commit 346da99

File tree

5 files changed

+102
-70
lines changed

5 files changed

+102
-70
lines changed

Parser/pgenmain.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ char *
136136
PyOS_Readline(FILE *sys_stdin, FILE *sys_stdout, char *prompt)
137137
{
138138
size_t n = 1000;
139-
char *p = PyMem_MALLOC(n);
139+
char *p = (char *)PyMem_MALLOC(n);
140140
char *q;
141141
if (p == NULL)
142142
return NULL;
@@ -149,7 +149,7 @@ PyOS_Readline(FILE *sys_stdin, FILE *sys_stdout, char *prompt)
149149
n = strlen(p);
150150
if (n > 0 && p[n-1] != '\n')
151151
p[n-1] = '\n';
152-
return PyMem_REALLOC(p, n+1);
152+
return (char *)PyMem_REALLOC(p, n+1);
153153
}
154154

155155
/* No-nonsense fgets */

0 commit comments

Comments
 (0)