[Python-checkins] python/dist/src/Python ast.c,1.1.2.18,1.1.2.19

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
Tue, 25 Mar 2003 11:42:27 -0800


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

Modified Files:
      Tag: ast-branch
	ast.c 
Log Message:
String literals are now compiled correctly, including compile-time string
catenation.  Error cases will probably blow up, due to NULL PyObjects
getting returned from helper routines that callers aren't expecting.


Index: ast.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/Attic/ast.c,v
retrieving revision 1.1.2.18
retrieving revision 1.1.2.19
diff -C2 -d -r1.1.2.18 -r1.1.2.19
*** ast.c	25 Mar 2003 19:35:25 -0000	1.1.2.18
--- ast.c	25 Mar 2003 19:42:23 -0000	1.1.2.19
***************
*** 28,32 ****
  static PyObject *parsenumber(const char *);
  static PyObject *parsestr(const char *s);
! static PyObject *parsestrplus(node *n);
  
  extern grammar _PyParser_Grammar; /* From graminit.c */
--- 28,32 ----
  static PyObject *parsenumber(const char *);
  static PyObject *parsestr(const char *s);
! static PyObject *parsestrplus(const node *n);
  
  extern grammar _PyParser_Grammar; /* From graminit.c */
***************
*** 558,562 ****
  	break;
      case STRING:
! 	return Str(PyString_FromString(STR(ch)));
  	break;
      case NUMBER:
--- 558,563 ----
  	break;
      case STRING:
!     	/* XXX parsestrplus can return NULL. */
! 	return Str(parsestrplus(n));
  	break;
      case NUMBER:
***************
*** 1646,1650 ****
   */
  static PyObject *
! parsestrplus(node *n)
  {
  	PyObject *v;
--- 1647,1651 ----
   */
  static PyObject *
! parsestrplus(const node *n)
  {
  	PyObject *v;