[Python-checkins] python/dist/src/Python compile.c,2.270,2.271

jhylton@users.sourceforge.net jhylton@users.sourceforge.net
Tue, 31 Dec 2002 10:17:48 -0800


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

Modified Files:
	compile.c 
Log Message:
SF patch [ 597919 ] compiler package and SET_LINENO

A variety of changes from Michael Hudson to get the compiler working
with 2.3.  The primary change is the handling of SET_LINENO:

# The set_lineno() function and the explicit emit() calls for
# SET_LINENO below are only used to generate the line number table.
# As of Python 2.3, the interpreter does not have a SET_LINENO
# instruction.  pyassem treats SET_LINENO opcodes as a special case.

A few other small changes:
 - Remove unused code from pycodegen and pyassem.
 - Fix error handling in parsermodule.  When PyParser_SimplerParseString()
   fails, it sets an exception with detailed info.  The parsermodule
   was clobbering that exception and replacing it was a generic
   "could not parse string" exception.  Keep the original exception.


Index: compile.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v
retrieving revision 2.270
retrieving revision 2.271
diff -C2 -d -r2.270 -r2.271
*** compile.c	23 Dec 2002 16:51:42 -0000	2.270
--- compile.c	31 Dec 2002 18:17:44 -0000	2.271
***************
*** 1242,1245 ****
--- 1242,1248 ----
  }
  
+ /* compiler.transformer.Transformer.decode_literal depends on what 
+    might seem like minor details of this function -- changes here 
+    must be reflected there. */
  static PyObject *
  parsestr(struct compiling *c, char *s)