diff options
author | Greg Stein <gstein@lyra.org> | 2000-07-16 21:39:49 (GMT) |
---|---|---|
committer | Greg Stein <gstein@lyra.org> | 2000-07-16 21:39:49 (GMT) |
commit | ff975003cf28bcc76b64754306ea5c652ed2c2e7 (patch) | |
tree | 09c4bdc6d4c221d247230a1c49f321be370f5bb3 /Objects | |
parent | 9eab78994eafa04a0af858fb7fff7ba17550e04b (diff) | |
download | cpython-ff975003cf28bcc76b64754306ea5c652ed2c2e7.zip cpython-ff975003cf28bcc76b64754306ea5c652ed2c2e7.tar.gz cpython-ff975003cf28bcc76b64754306ea5c652ed2c2e7.tar.bz2 |
stop messing around with goto and just write the macro correctly.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/unicodeobject.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 3542879..8323128 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -631,11 +631,12 @@ int utf8_decoding_error(const char **source, } } -#define UTF8_ERROR(details) do { \ - if (utf8_decoding_error(&s, &p, errors, details)) \ - goto onError; \ - goto nextChar; \ -} while (0) +#define UTF8_ERROR(details) \ + if (1) { \ + if (utf8_decoding_error(&s, &p, errors, (details))) \ + goto onError; \ + continue; \ + } else PyObject *PyUnicode_DecodeUTF8(const char *s, int size, @@ -731,8 +732,6 @@ PyObject *PyUnicode_DecodeUTF8(const char *s, UTF8_ERROR("unsupported Unicode code range"); } s += n; -nextChar: - /* empty */; } /* Adjust length */ |