[Python-Dev] [Python-checkins] cpython: Fix _Py_normalize_encoding(): ensure that buffer is big enough to store "utf-8"
Benjamin Peterson
benjamin at python.org
Thu Nov 7 23:29:37 CET 2013
More information about the Python-Dev mailing list
Thu Nov 7 23:29:37 CET 2013
- Previous message: [Python-Dev] [Python-checkins] cpython: Fix _Py_normalize_encoding(): ensure that buffer is big enough to store "utf-8"
- Next message: [Python-Dev] [Python-checkins] cpython: Issue #19512: Add PyRun_InteractiveOneObject() function
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
2013/11/7 Victor Stinner <victor.stinner at gmail.com>: > Calling strlen() at runtime may slow-down a function in the fast-path > of PyUnicode_Decode() and PyUnicode_AsEncodedString() which are > important functions. I know that some developers can execute strlen() > during compilation, but I don't see the need of replacing 6 with > strlen("utf-8")+1. GCC will fold constant strlen calls. Another option would be to use sizeof(). -- Regards, Benjamin
- Previous message: [Python-Dev] [Python-checkins] cpython: Fix _Py_normalize_encoding(): ensure that buffer is big enough to store "utf-8"
- Next message: [Python-Dev] [Python-checkins] cpython: Issue #19512: Add PyRun_InteractiveOneObject() function
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list