diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 79e6d160998820a1d875c67d7071d77078e826d7..4dbd97810becb7b20ebb944da36978bc2836ec44 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -11997,7 +11997,7 @@ class CoerceToBooleanNode(CoercionNode): Builtin.set_type: 'PySet_GET_SIZE', Builtin.frozenset_type: 'PySet_GET_SIZE', Builtin.bytes_type: 'PyBytes_GET_SIZE', - Builtin.unicode_type: 'PyUnicode_GET_SIZE', + Builtin.unicode_type: 'PyUnicode_GET_LENGTH', } def __init__(self, arg, env):