diff options
author | Christian Heimes <christian@cheimes.de> | 2007-11-04 11:43:14 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2007-11-04 11:43:14 (GMT) |
commit | 5894ba7fad07dbf07ac76aedf0fb2f70fb42d40e (patch) | |
tree | 60efee02e3d305b57990e816efc8ff0626fa09ac /Include | |
parent | 9c1257ecf83cc52986995367cedbb093fda140af (diff) | |
download | cpython-5894ba7fad07dbf07ac76aedf0fb2f70fb42d40e.zip cpython-5894ba7fad07dbf07ac76aedf0fb2f70fb42d40e.tar.gz cpython-5894ba7fad07dbf07ac76aedf0fb2f70fb42d40e.tar.bz2 |
Fixed a bug in PyUnicode_DecodeFSDefault. strcmp() returns 0 on success.
Added PyUnicode_DecodeFSDefaultAndSize
Fixed a problem with the sys.path code that caused a segfault on Windows when the path contains non ASCII chars. The code for sys.executable, exec_prefix and prefix should be fixed, too.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/unicodeobject.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h index 3ef354f..203dcef 100644 --- a/Include/unicodeobject.h +++ b/Include/unicodeobject.h @@ -155,6 +155,7 @@ typedef PY_UNICODE_TYPE Py_UNICODE; # define PyUnicode_DecodeCharmap PyUnicodeUCS2_DecodeCharmap # define PyUnicode_DecodeLatin1 PyUnicodeUCS2_DecodeLatin1 # define PyUnicode_DecodeFSDefault PyUnicodeUCS2_DecodeFSDefault +# define PyUnicode_DecodeFSDefaultAndSize PyUnicodeUCS2_DecodeFSDefaultAndSize # define PyUnicode_DecodeRawUnicodeEscape PyUnicodeUCS2_DecodeRawUnicodeEscape # define PyUnicode_DecodeUTF32 PyUnicodeUCS2_DecodeUTF32 # define PyUnicode_DecodeUTF32Stateful PyUnicodeUCS2_DecodeUTF32Stateful @@ -247,6 +248,7 @@ typedef PY_UNICODE_TYPE Py_UNICODE; # define PyUnicode_DecodeCharmap PyUnicodeUCS4_DecodeCharmap # define PyUnicode_DecodeLatin1 PyUnicodeUCS4_DecodeLatin1 # define PyUnicode_DecodeFSDefault PyUnicodeUCS4_DecodeFSDefault +# define PyUnicode_DecodeFSDefaultAndSize PyUnicodeUCS4_DecodeFSDefaultAndSize # define PyUnicode_DecodeRawUnicodeEscape PyUnicodeUCS4_DecodeRawUnicodeEscape # define PyUnicode_DecodeUTF32 PyUnicodeUCS4_DecodeUTF32 # define PyUnicode_DecodeUTF32Stateful PyUnicodeUCS4_DecodeUTF32Stateful @@ -657,6 +659,12 @@ PyAPI_FUNC(PyObject*) PyUnicode_DecodeFSDefault( const char *s /* encoded string */ ); +PyAPI_FUNC(PyObject*) PyUnicode_DecodeFSDefaultAndSize( + const char *s, /* encoded string */ + Py_ssize_t size /* size */ + ); + + /* Return a char* holding the UTF-8 encoded value of the Unicode object. |