Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4893abc

Browse files
committed
Merged revisions 79725 via svnmerge from
svn+ssh://[email protected]/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 ........
1 parent 8daa49e commit 4893abc

2 files changed

Lines changed: 2 additions & 11 deletions

File tree

Makefile.pre.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ PARSER_OBJS= $(POBJS) Parser/myreadline.o Parser/tokenizer.o
239239
PGOBJS= \
240240
Objects/obmalloc.o \
241241
Python/mysnprintf.o \
242+
Python/pyctype.o \
242243
Parser/tokenizer_pgen.o \
243244
Parser/printgrammar.o \
244245
Parser/pgenmain.o

Parser/tokenizer.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -179,16 +179,6 @@ decode_str(const char *str, int exec_input, struct tok_state *tok)
179179

180180
#else /* PGEN */
181181

182-
/* Ensure that the locale does not interfere with tokenization. */
183-
184-
static int
185-
ascii_isalnum(int c)
186-
{
187-
return (('a' <= c && c <= 'z') ||
188-
('A' <= c && c <= 'Z') ||
189-
('0' <= c && c <= '9'));
190-
}
191-
192182
static char *
193183
error_ret(struct tok_state *tok) /* XXX */
194184
{
@@ -255,7 +245,7 @@ get_coding_spec(const char *s, Py_ssize_t size)
255245
} while (t[0] == '\x20' || t[0] == '\t');
256246

257247
begin = t;
258-
while (ascii_isalnum(Py_CHARMASK(t[0])) ||
248+
while (Py_ISALNUM(t[0]) ||
259249
t[0] == '-' || t[0] == '_' || t[0] == '.')
260250
t++;
261251

0 commit comments

Comments
 (0)