[Python-checkins] python/dist/src/Python pythonrun.c,2.162,2.163

theller@users.sourceforge.net theller@users.sourceforge.net
Tue, 09 Jul 2002 02:23:29 -0700


Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv24231/Python

Modified Files:
	pythonrun.c 
Log Message:
Fix SF Bug 564931: compile() traceback must include filename.


Index: pythonrun.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/pythonrun.c,v
retrieving revision 2.162
retrieving revision 2.163
diff -C2 -d -r2.162 -r2.163
*** pythonrun.c	9 Jul 2002 02:57:01 -0000	2.162
--- pythonrun.c	9 Jul 2002 09:23:27 -0000	2.163
***************
*** 1135,1139 ****
  	node *n;
  	PyCodeObject *co;
! 	n = PyParser_SimpleParseStringFlags(str, start, PARSER_FLAGS(flags));
  	if (n == NULL)
  		return NULL;
--- 1135,1141 ----
  	node *n;
  	PyCodeObject *co;
! 
! 	n = PyParser_SimpleParseStringFlagsFilename(str, filename, start,
! 						    PARSER_FLAGS(flags));
  	if (n == NULL)
  		return NULL;
***************
*** 1148,1152 ****
  	node *n;
  	struct symtable *st;
! 	n = PyParser_SimpleParseString(str, start);
  	if (n == NULL)
  		return NULL;
--- 1150,1155 ----
  	node *n;
  	struct symtable *st;
! 	n = PyParser_SimpleParseStringFlagsFilename(str, filename,
! 						    start, 0);
  	if (n == NULL)
  		return NULL;
***************
*** 1194,1197 ****
--- 1197,1222 ----
  {
  	return PyParser_SimpleParseStringFlags(str, start, 0);
+ }
+ 
+ node *
+ PyParser_SimpleParseStringFlagsFilename(char *str, char *filename,
+ 					int start, int flags)
+ {
+ 	node *n;
+ 	perrdetail err;
+ 
+ 	n = PyParser_ParseStringFlagsFilename(str, filename, 
+ 					      &_PyParser_Grammar,
+ 					      start, &err, flags);
+ 	if (n == NULL)
+ 		err_input(&err);
+ 	return n;
+ }
+ 
+ node *
+ PyParser_SimpleParseStringFilename(char *str, char *filename, int start)
+ {
+ 	return PyParser_SimpleParseStringFlagsFilename(str, filename,
+ 						       start, 0);
  }