[Python-checkins] r79726 - in python/branches/py3k: Makefile.pre.in Parser/tokenizer.c

benjamin.peterson python-checkins at python.org
Sun Apr 4 01:10:01 CEST 2010


Author: benjamin.peterson
Date: Sun Apr  4 01:10:01 2010
New Revision: 79726

Log:
Merged revisions 79725 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r79725 | benjamin.peterson | 2010-04-03 18:03:35 -0500 (Sat, 03 Apr 2010) | 4 lines
  
  use our own locale independent ctype macros
  
  requires building pyctype.o into pgen
........


Modified:
   python/branches/py3k/   (props changed)
   python/branches/py3k/Makefile.pre.in
   python/branches/py3k/Parser/tokenizer.c

Modified: python/branches/py3k/Makefile.pre.in
==============================================================================
--- python/branches/py3k/Makefile.pre.in	(original)
+++ python/branches/py3k/Makefile.pre.in	Sun Apr  4 01:10:01 2010
@@ -239,6 +239,7 @@
 PGOBJS=		\
 		Objects/obmalloc.o \
 		Python/mysnprintf.o \
+                Python/pyctype.o \
 		Parser/tokenizer_pgen.o \
 		Parser/printgrammar.o \
 		Parser/pgenmain.o

Modified: python/branches/py3k/Parser/tokenizer.c
==============================================================================
--- python/branches/py3k/Parser/tokenizer.c	(original)
+++ python/branches/py3k/Parser/tokenizer.c	Sun Apr  4 01:10:01 2010
@@ -179,16 +179,6 @@
 
 #else /* PGEN */
 
-/* Ensure that the locale does not interfere with tokenization. */
-
-static int
-ascii_isalnum(int c)
-{
-	return (('a' <= c && c <= 'z') ||
-		('A' <= c && c <= 'Z') ||
-		('0' <= c && c <= '9'));
-}
-
 static char *
 error_ret(struct tok_state *tok) /* XXX */
 {
@@ -255,7 +245,7 @@
 			} while (t[0] == '\x20' || t[0] == '\t');
 
 			begin = t;
-			while (ascii_isalnum(Py_CHARMASK(t[0])) ||
+			while (Py_ISALNUM(t[0]) ||
 			       t[0] == '-' || t[0] == '_' || t[0] == '.')
 				t++;
 


More information about the Python-checkins mailing list