diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-11-20 17:41:31 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-11-20 17:41:31 (GMT) |
commit | d5c4022d2abc67ef72de326bb12023bb969e80a9 (patch) | |
tree | 6b00134f4d22470d1eed1bc4aa4f2e7f6bc28afb /Objects | |
parent | 2e9cfadd7c1a70ae77073b063c5a3fb825be86d7 (diff) | |
download | cpython-d5c4022d2abc67ef72de326bb12023bb969e80a9.zip cpython-d5c4022d2abc67ef72de326bb12023bb969e80a9.tar.gz cpython-d5c4022d2abc67ef72de326bb12023bb969e80a9.tar.bz2 |
Remove the two ugly and unused WRITE_ASCII_OR_WSTR and WRITE_WSTR macros
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/unicodeobject.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index b02adee..18780ea 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -5589,21 +5589,6 @@ length_of_escaped_ascii_string(const char *s, Py_ssize_t size) 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 @@ PyUnicode_DecodeUnicodeEscape(const char *s, 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 |