diff --git a/Cython/Compiler/PyrexTypes.py b/Cython/Compiler/PyrexTypes.py
index da7452cf00f33c624f88e4c32d31489ef925ae1c..0661ce7c8a7062a735ef3208728afb74b2fe8495 100755
--- a/Cython/Compiler/PyrexTypes.py
+++ b/Cython/Compiler/PyrexTypes.py
@@ -1598,7 +1598,7 @@ static CYTHON_INLINE Py_UNICODE __Pyx_PyObject_AsPy_UNICODE(PyObject* x) {
         return PyUnicode_AS_UNICODE(x)[0];
         #endif
     } else {
-        #if CYTHON_PEP393_ENABLED
+        #if !CYTHON_PEP393_ENABLED
         if (unlikely(!maxval))
             maxval = (long)PyUnicode_GetMax();
         #endif