mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
CJK codecs: less magic macros, require explicit semicolon
This commit is contained in:
parent
146a2ed0f2
commit
14c9fea60a
10 changed files with 233 additions and 190 deletions
|
|
@ -118,11 +118,11 @@ typedef struct {
|
|||
#define ERROR_IGNORE (PyObject *)(2)
|
||||
#define ERROR_REPLACE (PyObject *)(3)
|
||||
#define ERROR_ISCUSTOM(p) ((p) < ERROR_STRICT || ERROR_REPLACE < (p))
|
||||
#define ERROR_DECREF(p) do { \
|
||||
if (p != NULL && ERROR_ISCUSTOM(p)) { \
|
||||
Py_DECREF(p); \
|
||||
} \
|
||||
} while (0);
|
||||
#define ERROR_DECREF(p) \
|
||||
do { \
|
||||
if (p != NULL && ERROR_ISCUSTOM(p)) \
|
||||
Py_DECREF(p); \
|
||||
} while (0);
|
||||
|
||||
#define MBENC_FLUSH 0x0001 /* encode all characters encodable */
|
||||
#define MBENC_MAX MBENC_FLUSH
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue