summaryrefslogtreecommitdiffstats
path: root/Include/unicodeobject.h
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-11-19 11:54:53 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-11-19 11:54:53 (GMT)
commit4a58707a340cacea6f8e6a82adfcc10a230e1185 (patch)
tree93f42c1524db7e6ba8a60f9a1f2c656c6e0931d9 /Include/unicodeobject.h
parent4d3f109ad3d1870130816b94a1f5d6f6c1a07586 (diff)
downloadcpython-4a58707a340cacea6f8e6a82adfcc10a230e1185.zip
cpython-4a58707a340cacea6f8e6a82adfcc10a230e1185.tar.gz
cpython-4a58707a340cacea6f8e6a82adfcc10a230e1185.tar.bz2
Add _PyUnicodeWriter_WriteASCIIString() function
Diffstat (limited to 'Include/unicodeobject.h')
-rw-r--r--Include/unicodeobject.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h
index 20ce41d..b4891e4 100644
--- a/Include/unicodeobject.h
+++ b/Include/unicodeobject.h
@@ -962,12 +962,20 @@ _PyUnicodeWriter_WriteSubstring(_PyUnicodeWriter *writer,
Py_ssize_t end
);
+/* Append a ASCII-encoded byte string.
+ Return 0 on success, raise an exception and return -1 on error. */
+PyAPI_FUNC(int)
+_PyUnicodeWriter_WriteASCIIString(_PyUnicodeWriter *writer,
+ const char *str, /* ASCII-encoded byte string */
+ Py_ssize_t len /* number of bytes, or -1 if unknown */
+ );
+
/* Append a latin1-encoded byte string.
Return 0 on success, raise an exception and return -1 on error. */
PyAPI_FUNC(int)
-_PyUnicodeWriter_WriteCstr(_PyUnicodeWriter *writer,
- const char *str, /* latin1-encoded byte string */
- Py_ssize_t len /* length in bytes */
+_PyUnicodeWriter_WriteLatin1String(_PyUnicodeWriter *writer,
+ const char *str, /* latin1-encoded byte string */
+ Py_ssize_t len /* length in bytes */
);
/* Get the value of the writer as an Unicode string. Clear the
@@ -979,6 +987,9 @@ _PyUnicodeWriter_Finish(_PyUnicodeWriter *writer);
/* Deallocate memory of a writer (clear its internal buffer). */
PyAPI_FUNC(void)
_PyUnicodeWriter_Dealloc(_PyUnicodeWriter *writer);
+
+PyAPI_FUNC(int) _PyObject_ReprWriter(_PyUnicodeWriter *writer,
+ PyObject *v);
#endif
#ifndef Py_LIMITED_API