Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | | Improve string forms and PyUnicode_Resize() documentation | Victor Stinner | 2011-10-03 | 1 | -13/+22 | |
| | | | | | | | | | | Remove also the FIXME for resize_copy(): as discussed with Martin, copy the string on resize if the string is not resizable is just fine. | |||||
* | | _PyUnicode_CheckConsistency() checks utf8 field consistency | Victor Stinner | 2011-10-03 | 1 | -0/+2 | |
| | | ||||||
* | | PyUnicode_Ready() now sets ascii=1 if maxchar < 128 | Victor Stinner | 2011-10-03 | 1 | -16/+25 | |
| | | | | | | | | | | ascii=1 is no more reserved to PyASCIIObject. Use PyUnicode_IS_COMPACT_ASCII(obj) to check if obj is a PyASCIIObject (as before). | |||||
* | | Add _PyUnicode_CheckConsistency() macro to help debugging | Victor Stinner | 2011-10-03 | 1 | -0/+46 | |
| | | | | | | | | | | | | * Document Unicode string states * Use _PyUnicode_CheckConsistency() to ensure that objects are always consistent. | |||||
* | | PyUnicode_READ_CHAR() ensures that the string is ready | Victor Stinner | 2011-10-02 | 1 | -8/+10 | |
| | | ||||||
* | | Use Py_UCS1 instead of unsigned char in unicodeobject.h | Victor Stinner | 2011-10-02 | 1 | -2/+2 | |
| | | ||||||
* | | PyUnicode_WriteChar() raises IndexError on invalid index | Victor Stinner | 2011-10-02 | 1 | -1/+3 | |
| | | | | | | | | | | PyUnicode_WriteChar() raises also a ValueError if the string has more than 1 reference. | |||||
* | | _PyUnicode_AsKind() is *not* part of the stable ABI | Victor Stinner | 2011-10-01 | 1 | -0/+2 | |
| | | ||||||
* | | PyUnicode_CHARACTER_SIZE(): add a reference to PyUnicode_KIND_SIZE() | Victor Stinner | 2011-10-01 | 1 | -2/+5 | |
| | | ||||||
* | | Add PyUnicode_Copy() function, include it to the public API | Victor Stinner | 2011-09-30 | 1 | -0/+5 | |
| | | ||||||
* | | _PyUnicode_Ready() cannot be used on ready strings anymore | Victor Stinner | 2011-09-29 | 1 | -7/+9 | |
| | | | | | | | | | | | | * Change its prototype: PyObject* instead of PyUnicodeoObject*. * Remove an old assertion, the result of PyUnicode_READY (_PyUnicode_Ready) must be checked instead | |||||
* | | Move _PyUnicode_UTF8() and _PyUnicode_UTF8_LENGTH() outside unicodeobject.h | Victor Stinner | 2011-09-29 | 1 | -10/+0 | |
| | | | | | | | | Move these macros to unicodeobject.c | |||||
* | | Add a note in PyUnicode_CopyCharacters() doc: it doesn't write null character | Victor Stinner | 2011-09-29 | 1 | -3/+5 | |
| | | | | | | | | Cleanup also the code (avoid the goto). | |||||
* | | PyUnicode_CopyCharacters() fails if 'to' has more than 1 reference | Victor Stinner | 2011-09-28 | 1 | -1/+2 | |
| | | ||||||
* | | Mark _PyUnicode_FindMaxCharAndNumSurrogatePairs() as private | Victor Stinner | 2011-09-28 | 1 | -12/+0 | |
| | | ||||||
* | | Strip trailing spaces in unicodeobject.[ch] | Victor Stinner | 2011-09-28 | 1 | -5/+5 | |
| | | ||||||
* | | PyUnicode_CopyCharacters() checks for buffer and character overflow | Victor Stinner | 2011-09-28 | 1 | -3/+15 | |
| | | | | | | | | It now returns the number of written characters on success. | |||||
* | | Mark PyUnicode_CONVERT_BYTES as private | Victor Stinner | 2011-09-28 | 1 | -15/+0 | |
| | | ||||||
* | | Set Py_UNICODE_REPLACEMENT_CHARACTER type to Py_UCS4, instead of Py_UNICODE | Victor Stinner | 2011-09-28 | 1 | -1/+1 | |
| | | ||||||
* | | Implement PEP 393. | Martin v. Löwis | 2011-09-28 | 1 | -264/+519 | |
| | | ||||||
* | | Merge 3.2: Fix PyUnicode_AsWideCharString() doc | Victor Stinner | 2011-09-06 | 1 | -1/+1 | |
|\ \ | |/ | | | | | | | | | - Fix PyUnicode_AsWideCharString() doc: size doesn't contain the null character - Fix spelling of the null character | |||||
| * | Fix PyUnicode_AsWideCharString() doc: size doesn't contain the null character | Victor Stinner | 2011-09-06 | 1 | -1/+1 | |
| | | | | | | | | Fix also spelling of the null character. | |||||
* | | #10542: Add 4 macros to work with surrogates: Py_UNICODE_IS_SURROGATE, ↵ | Ezio Melotti | 2011-08-22 | 1 | -0/+9 | |
| | | | | | | | | Py_UNICODE_IS_HIGH_SURROGATE, Py_UNICODE_IS_LOW_SURROGATE, Py_UNICODE_JOIN_SURROGATES. | |||||
* | | Issue #9642: Uniformize the tests on the availability of the mbcs codec | Victor Stinner | 2011-07-04 | 1 | -2/+6 | |
| | | | | | | | | Add a new HAVE_MBCS define. | |||||
* | | Remove useless argument of _PyUnicode_AsDefaultEncodedString() | Victor Stinner | 2011-03-02 | 1 | -2/+1 | |
|/ | ||||||
* | Issue #9738: Ooops, fix typos in my previous commit (r87506) | Victor Stinner | 2010-12-27 | 1 | -1/+1 | |
| | ||||||
* | Issue #9738: document encodings of unicode functions | Victor Stinner | 2010-12-27 | 1 | -5/+7 | |
| | ||||||
* | Take PyUnicode_TransformDecimalToASCII out of the limited API. | Georg Brandl | 2010-12-05 | 1 | -0/+2 | |
| | ||||||
* | Issue #10557: Fixed error messages from float() and other numeric | Alexander Belopolsky | 2010-12-04 | 1 | -0/+11 | |
| | | | | | | types. Added a new API function, PyUnicode_TransformDecimalToASCII(), which transforms non-ASCII decimal digits in a Unicode string to their ASCII equivalents. | |||||
* | Merge branches/pep-0384. | Martin v. Löwis | 2010-12-03 | 1 | -1/+61 | |
| | ||||||
* | Issue #10413: Updated comments to reflect code changes | Alexander Belopolsky | 2010-11-16 | 1 | -18/+13 | |
| | ||||||
* | Issue #8761: Mangle PyUnicode_CompareWithASCIIString function name for | Victor Stinner | 2010-10-24 | 1 | -2/+2 | |
| | | | | narrow/wide unicode build. | |||||
* | make hashes always the size of pointers; introduce Py_hash_t #9778 | Benjamin Peterson | 2010-10-17 | 1 | -1/+1 | |
| | ||||||
* | Use locale encoding if Py_FileSystemDefaultEncoding is not set | Victor Stinner | 2010-10-15 | 1 | -3/+6 | |
| | | | | | | | | * PyUnicode_EncodeFSDefault(), PyUnicode_DecodeFSDefaultAndSize() and PyUnicode_DecodeFSDefault() use the locale encoding instead of UTF-8 if Py_FileSystemDefaultEncoding is NULL * redecode_filenames() functions and _Py_code_object_list (issue #9630) are no more needed: remove them | |||||
* | PyUnicode_AsWideCharString() takes a PyObject*, not a PyUnicodeObject* | Victor Stinner | 2010-10-07 | 1 | -1/+1 | |
| | | | | | All unicode functions uses PyObject* except PyUnicode_AsWideChar(). Fix the prototype for the new function PyUnicode_AsWideCharString(). | |||||
* | Issue #9979: Create function PyUnicode_AsWideCharString(). | Victor Stinner | 2010-09-29 | 1 | -2/+17 | |
| | ||||||
* | #9210: remove --with-wctype-functions configure option. | Amaury Forgeot d'Arc | 2010-09-12 | 1 | -36/+1 | |
| | | | | | | | | The internal unicode database is now always used. (after 5 years: see http://mail.python.org/pipermail/python-dev/2004-December/050193.html ) | |||||
* | Issue #9738: PyUnicode_FromFormat() and PyErr_Format() raise an error on | Victor Stinner | 2010-09-11 | 1 | -2/+8 | |
| | | | | | | a non-ASCII byte in the format string. Document also the encoding. | |||||
* | Rename PyUnicode_strdup() to PyUnicode_AsUnicodeCopy() | Victor Stinner | 2010-09-03 | 1 | -1/+1 | |
| | ||||||
* | Create PyUnicode_strdup() function | Victor Stinner | 2010-09-01 | 1 | -1/+10 | |
| | ||||||
* | Create Py_UNICODE_strcat() function | Victor Stinner | 2010-09-01 | 1 | -0/+3 | |
| | ||||||
* | Issue #9549: sys.setdefaultencoding() and PyUnicode_SetDefaultEncoding() | Antoine Pitrou | 2010-09-01 | 1 | -12/+0 | |
| | | | | | are now removed, since their effect was inexistent in 3.x (the default encoding is hardcoded to utf-8 and cannot be changed). | |||||
* | #5127: Even on narrow unicode builds, the C functions that access the Unicode | Amaury Forgeot d'Arc | 2010-08-18 | 1 | -58/+22 | |
| | | | | | | | | | | Database (Py_UNICODE_TOLOWER, Py_UNICODE_ISDECIMAL, and others) now accept and return characters from the full Unicode range (Py_UCS4). The differences from Python code are few: - unicodedata.numeric(), unicodedata.decimal() and unicodedata.digit() now return the correct value for large code points - repr() may consider more characters as printable. | |||||
* | Issue #9425: Create Py_UNICODE_strncmp() function | Victor Stinner | 2010-08-16 | 1 | -6/+21 | |
| | | | | | The code is based on strncmp() of the libiberty library, function in the public domain. | |||||
* | Issue #9542: Create PyUnicode_FSDecoder() function | Victor Stinner | 2010-08-13 | 1 | -3/+9 | |
| | | | | | | | | | | | | It's a ParseTuple converter: decode bytes objects to unicode using PyUnicode_DecodeFSDefaultAndSize(); str objects are output as-is. * Don't specify surrogateescape error handler in the comments nor the documentation, but PyUnicode_DecodeFSDefaultAndSize() and PyUnicode_EncodeFSDefault() because these functions use strict error handler for the mbcs encoding (on Windows). * Remove PyUnicode_FSConverter() comment in unicodeobject.c to avoid inconsistency with unicodeobject.h. | |||||
* | Issue #9425: create Py_UNICODE_strrchr() function | Victor Stinner | 2010-08-10 | 1 | -0/+4 | |
| | ||||||
* | #9078: fix some Unicode C API descriptions, in comments and docs. | Georg Brandl | 2010-06-27 | 1 | -6/+6 | |
| | ||||||
* | rephrase | Benjamin Peterson | 2010-05-15 | 1 | -2/+2 | |
| | ||||||
* | Issue #8715: Create PyUnicode_EncodeFSDefault() function: Encode a Unicode | Victor Stinner | 2010-05-15 | 1 | -0/+10 | |
| | | | | | | object to Py_FileSystemDefaultEncoding with the "surrogateescape" error handler, return a bytes object. If Py_FileSystemDefaultEncoding is not set, fall back to UTF-8. | |||||
* | Issue #8711: Document PyUnicode_DecodeFSDefault*() functions | Victor Stinner | 2010-05-14 | 1 | -8/+12 | |
| | | | | | | | | | | * Add paragraph titles to c-api/unicode.rst. * Fix PyUnicode_DecodeFSDefault*() comment: it now uses the "surrogateescape" error handler (and not "replace") * Remove "The function is intended to be used for paths and file names only during bootstrapping process where the codecs are not set up." from PyUnicode_FSConverter() comment: it is used after the bootstrapping and for other purposes than file names |