[issue26130] redundant local copy of a char pointer in classify in Parser\parser.c
Martin Panter
report at bugs.python.org
Fri Jan 15 20:37:37 EST 2016
Martin Panter added the comment:
Yes it looks like this is code left over from removing the “register” keyword in revision 0530aadff696, Issue 18722. I quickly looked over the changes in that revision. I couldn’t find any more clear redundancies.
I guess this patch is also applicable to 3.5.
Maybe the following comments and copies are not needed either. But these cases look like heavily optimized code, so I would be careful with them:
https://hg.python.org/cpython/file/4b1bca0b560f/Objects/stringlib/codecs.h#l40
https://hg.python.org/cpython/file/4b1bca0b560f/Objects/stringlib/codecs.h#l519
https://hg.python.org/cpython/file/4b1bca0b560f/Objects/stringlib/find_max_char.h#l26
https://hg.python.org/cpython/file/4b1bca0b560f/Objects/unicodeobject.c#l4794
https://hg.python.org/cpython/file/4b1bca0b560f/Objects/unicodeobject.c#l4819
The last two have mangled comments /* Help allocation */, which previously read /* Help register allocation */.
----------
nosy: +martin.panter
stage: -> patch review
versions: +Python 3.5
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26130>
_______________________________________
More information about the Python-bugs-list
mailing list