CJK codecs: less magic macros, require explicit semicolon

This commit is contained in:
Victor Stinner 2013-10-29 00:19:27 +01:00
parent 146a2ed0f2
commit 14c9fea60a
10 changed files with 233 additions and 190 deletions

View file

@ -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