]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Make identifiers str (not str8) objects throughout.
authorMartin v. Löwis <martin@v.loewis.de>
Sun, 10 Jun 2007 09:51:05 +0000 (09:51 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sun, 10 Jun 2007 09:51:05 +0000 (09:51 +0000)
commit5b222135f8d2492713994f2cb003980e87ce6a72
tree3ac3a6a1d7805360ed779e884ca6c4b3f000321f
parent38e43c25eede3fa77d90ac8183cc0335f4861f4a
Make identifiers str (not str8) objects throughout.
This affects the parser, various object implementations,
and all places that put identifiers into C string literals.

In testing, a number of crashes occurred as code would
fail when the recursion limit was reached (such as the
Unicode interning dictionary having key/value pairs where
key is not value). To solve these, I added an overflowed
flag, which allows for 50 more recursions after the
limit was reached and the exception was raised, and
a recursion_critical flag, which indicates that recursion
absolutely must be allowed, i.e. that a certain call
must not cause a stack overflow exception.

There are still some places where both str and str8 are
accepted as identifiers; these should eventually be
removed.
40 files changed:
Include/ceval.h
Include/pystate.h
Include/stringobject.h
Include/unicodeobject.h
Lib/test/test_frozen.py
Lib/test/test_new.py
Lib/test/test_sys.py
Modules/_codecsmodule.c
Modules/_hotshot.c
Modules/cPickle.c
Modules/gcmodule.c
Modules/unicodedata.c
Objects/abstract.c
Objects/bytesobject.c
Objects/classobject.c
Objects/codeobject.c
Objects/complexobject.c
Objects/descrobject.c
Objects/dictobject.c
Objects/frameobject.c
Objects/funcobject.c
Objects/methodobject.c
Objects/moduleobject.c
Objects/object.c
Objects/stringobject.c
Objects/typeobject.c
Objects/unicodeobject.c
Parser/tokenizer.c
Python/Python-ast.c
Python/ast.c
Python/bltinmodule.c
Python/ceval.c
Python/compile.c
Python/future.c
Python/import.c
Python/modsupport.c
Python/pystate.c
Python/pythonrun.c
Python/symtable.c
Python/sysmodule.c