[Python-Dev] _PyUnicode_CheckConsistency() too strict?
Ethan Furman
ethan at stoneleaf.us
Mon Feb 3 19:08:06 CET 2014
More information about the Python-Dev mailing list
Mon Feb 3 19:08:06 CET 2014
- Previous message: [Python-Dev] _PyUnicode_CheckConsistency() too strict?
- Next message: [Python-Dev] _PyUnicode_CheckConsistency() too strict?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 02/03/2014 09:52 AM, Guido van Rossum wrote:
> Can we provide a convenience API (or even a few lines of code one could copy+paste) that determines if a particular
> 8-bit string should have max-char equal to 127 or 255?
Isn't that what this is?
============================================================
PyObject* PyUnicode_FromKindAndData(
int kind, const void *buffer, Py_ssize_t size)
Create a new Unicode object with the given kind (possible
values are PyUnicode_1BYTE_KIND etc., as returned by
PyUnicode_KIND()). The buffer must point to an array of
size units of 1, 2 or 4 bytes per character, as given by
the kind.
============================================================
--
~Ethan~
- Previous message: [Python-Dev] _PyUnicode_CheckConsistency() too strict?
- Next message: [Python-Dev] _PyUnicode_CheckConsistency() too strict?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list