Skip to content

Commit

Permalink
Merged revisions 79725 via svnmerge from
Browse files Browse the repository at this point in the history
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
........
  • Loading branch information
benjaminp committed Apr 3, 2010
1 parent 8daa49e commit 4893abc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
1 change: 1 addition & 0 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ PARSER_OBJS= $(POBJS) Parser/myreadline.o Parser/tokenizer.o
PGOBJS= \
Objects/obmalloc.o \
Python/mysnprintf.o \
Python/pyctype.o \
Parser/tokenizer_pgen.o \
Parser/printgrammar.o \
Parser/pgenmain.o
Expand Down
12 changes: 1 addition & 11 deletions Parser/tokenizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,6 @@ decode_str(const char *str, int exec_input, struct tok_state *tok)

#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 */
{
Expand Down Expand Up @@ -255,7 +245,7 @@ get_coding_spec(const char *s, Py_ssize_t size)
} 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++;

Expand Down

0 comments on commit 4893abc

Please sign in to comment.