From 27327e811b5d191272c1c955a0b172887dc2503f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 8 Mar 2014 21:19:05 +0530 Subject: [PATCH] Clearer error message when compiling on python >= 3.3 --- src/calibre/utils/icu_calibre_utils.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/calibre/utils/icu_calibre_utils.h b/src/calibre/utils/icu_calibre_utils.h index 5cab803258..a965d0c072 100644 --- a/src/calibre/utils/icu_calibre_utils.h +++ b/src/calibre/utils/icu_calibre_utils.h @@ -21,7 +21,10 @@ #include #include -#if PY_VERSION_HEX < 0x03030000 +#if PY_VERSION_HEX >= 0x03030000 +#error Not implemented for python >= 3.3 +#endif + // Roundtripping will need to be implemented differently for python 3.3+ where strings are stored with variable widths #ifndef NO_PYTHON_TO_ICU @@ -67,5 +70,4 @@ static PyObject* icu_to_python(UChar *src, int32_t sz) { } #endif -#endif