mirror of
https://github.com/python/cpython.git
synced 2025-07-17 16:25:18 +00:00
stop messing around with goto and just write the macro correctly.
This commit is contained in:
parent
9eab78994e
commit
ff975003cf
1 changed files with 6 additions and 7 deletions
|
@ -631,11 +631,12 @@ int utf8_decoding_error(const char **source,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define UTF8_ERROR(details) do { \
|
#define UTF8_ERROR(details) \
|
||||||
if (utf8_decoding_error(&s, &p, errors, details)) \
|
if (1) { \
|
||||||
|
if (utf8_decoding_error(&s, &p, errors, (details))) \
|
||||||
goto onError; \
|
goto onError; \
|
||||||
goto nextChar; \
|
continue; \
|
||||||
} while (0)
|
} else
|
||||||
|
|
||||||
PyObject *PyUnicode_DecodeUTF8(const char *s,
|
PyObject *PyUnicode_DecodeUTF8(const char *s,
|
||||||
int size,
|
int size,
|
||||||
|
@ -731,8 +732,6 @@ PyObject *PyUnicode_DecodeUTF8(const char *s,
|
||||||
UTF8_ERROR("unsupported Unicode code range");
|
UTF8_ERROR("unsupported Unicode code range");
|
||||||
}
|
}
|
||||||
s += n;
|
s += n;
|
||||||
nextChar:
|
|
||||||
/* empty */;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Adjust length */
|
/* Adjust length */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue