diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2012-04-27 21:40:13 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2012-04-27 21:40:13 (GMT) |
commit | d0880d57b053179a8dd91f2b6fbcb5b5ddf56a1d (patch) | |
tree | 1c9262ace671960cd9353ff6fac2addf0c17abf8 /Include | |
parent | 19b409a3410605380c9fdcb2e35511c9dff53fa6 (diff) | |
download | cpython-d0880d57b053179a8dd91f2b6fbcb5b5ddf56a1d.zip cpython-d0880d57b053179a8dd91f2b6fbcb5b5ddf56a1d.tar.gz cpython-d0880d57b053179a8dd91f2b6fbcb5b5ddf56a1d.tar.bz2 |
Simplify and optimize formatlong()
* Remove _PyBytes_FormatLong(): inline it into formatlong()
* the input type is always a long, so remove the code for bool
* don't duplicate the string if the length does not change
* Use PyUnicode_DATA() instead of _PyUnicode_AsString()
Diffstat (limited to 'Include')
-rw-r--r-- | Include/bytesobject.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/Include/bytesobject.h b/Include/bytesobject.h index e1af89f..d7c7ffd 100644 --- a/Include/bytesobject.h +++ b/Include/bytesobject.h @@ -62,8 +62,6 @@ PyAPI_FUNC(void) PyBytes_Concat(PyObject **, PyObject *); PyAPI_FUNC(void) PyBytes_ConcatAndDel(PyObject **, PyObject *); #ifndef Py_LIMITED_API PyAPI_FUNC(int) _PyBytes_Resize(PyObject **, Py_ssize_t); -PyAPI_FUNC(PyObject *) _PyBytes_FormatLong(PyObject*, int, int, - int, char**, int*); #endif PyAPI_FUNC(PyObject *) PyBytes_DecodeEscape(const char *, Py_ssize_t, const char *, Py_ssize_t, |