diff options
author | Guido van Rossum <guido@python.org> | 2000-03-28 20:29:59 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-03-28 20:29:59 (GMT) |
commit | 24bdb0474fca186da95dc045f157074e4d57c6b6 (patch) | |
tree | f3dc1f458303217ae0b3ecbff23d7dfe5e7b6d13 /Misc/unicode.txt | |
parent | 66d451397577a7710902b75104839afc7ca05b81 (diff) | |
download | cpython-24bdb0474fca186da95dc045f157074e4d57c6b6.zip cpython-24bdb0474fca186da95dc045f157074e4d57c6b6.tar.gz cpython-24bdb0474fca186da95dc045f157074e4d57c6b6.tar.bz2 |
Marc-Andre Lemburg:
The attached patch set includes a workaround to get Python with
Unicode compile on BSDI 4.x (courtesy Thomas Wouters; the cause
is a bug in the BSDI wchar.h header file) and Python interfaces
for the MBCS codec donated by Mark Hammond.
Also included are some minor corrections w/r to the docs of
the new "es" and "es#" parser markers (use PyMem_Free() instead
of free(); thanks to Mark Hammond for finding these).
The unicodedata tests are now in a separate file
(test_unicodedata.py) to avoid problems if the module cannot
be found.
Diffstat (limited to 'Misc/unicode.txt')
-rw-r--r-- | Misc/unicode.txt | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Misc/unicode.txt b/Misc/unicode.txt index fc1f2c5..ce74c05 100644 --- a/Misc/unicode.txt +++ b/Misc/unicode.txt @@ -740,8 +740,8 @@ These markers are used by the PyArg_ParseTuple() APIs: On output, a buffer of the needed size is allocated and returned through *buffer as NULL-terminated string. The encoded may not contain embedded NULL characters. - The caller is responsible for free()ing the allocated *buffer - after usage. + The caller is responsible for calling PyMem_Free() + to free the allocated *buffer after usage. "es#": Takes three parameters: encoding (const char *), @@ -755,8 +755,9 @@ These markers are used by the PyArg_ParseTuple() APIs: If *buffer is NULL, a buffer of the needed size is allocated and output copied into it. *buffer is then - updated to point to the allocated memory area. The caller - is responsible for free()ing *buffer after usage. + updated to point to the allocated memory area. + The caller is responsible for calling PyMem_Free() + to free the allocated *buffer after usage. In both cases *buffer_len is updated to the number of characters written (excluding the trailing NULL-byte). @@ -784,7 +785,7 @@ Using "es#" with auto-allocation: return NULL; } str = PyString_FromStringAndSize(buffer, buffer_len); - free(buffer); + PyMem_Free(buffer); return str; } @@ -807,7 +808,7 @@ Using "es" with auto-allocation returning a NULL-terminated string: return NULL; } str = PyString_FromString(buffer); - free(buffer); + PyMem_Free(buffer); return str; } |