[Python-checkins] cpython: Remove the two ugly and unused WRITE_ASCII_OR_WSTR and WRITE_WSTR macros
victor.stinner
python-checkins at python.org
Sun Nov 20 22:53:24 CET 2011
http://hg.python.org/cpython/rev/71cf0ea0b341
changeset: 73637:71cf0ea0b341
user: Victor Stinner <victor.stinner at haypocalc.com>
date: Sun Nov 20 18:41:31 2011 +0100
summary:
Remove the two ugly and unused WRITE_ASCII_OR_WSTR and WRITE_WSTR macros
files:
Objects/unicodeobject.c | 18 ------------------
1 files changed, 0 insertions(+), 18 deletions(-)
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -5589,21 +5589,6 @@
return length;
}
-/* Similar to PyUnicode_WRITE but either write into wstr field
- or treat string as ASCII. */
-#define WRITE_ASCII_OR_WSTR(kind, buf, index, value) \
- do { \
- if ((kind) != PyUnicode_WCHAR_KIND) \
- ((unsigned char *)(buf))[(index)] = (unsigned char)(value); \
- else \
- ((Py_UNICODE *)(buf))[(index)] = (Py_UNICODE)(value); \
- } while (0)
-
-#define WRITE_WSTR(buf, index, value) \
- assert(kind == PyUnicode_WCHAR_KIND), \
- ((Py_UNICODE *)(buf))[(index)] = (Py_UNICODE)(value)
-
-
static _PyUnicode_Name_CAPI *ucnhash_CAPI = NULL;
PyObject *
@@ -5873,9 +5858,6 @@
return NULL;
}
-#undef WRITE_ASCII_OR_WSTR
-#undef WRITE_WSTR
-
/* Return a Unicode-Escape string version of the Unicode object.
If quotes is true, the string is enclosed in u"" or u'' quotes as
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list