summaryrefslogtreecommitdiff
path: root/Cython/Compiler/ModuleNode.py
diff options
context:
space:
mode:
authormattip <matti.picus@gmail.com>2018-09-25 03:14:34 +0300
committermattip <matti.picus@gmail.com>2018-09-25 03:14:34 +0300
commit37fb8a2d43924fd9d616e3c16718bc137c015bf0 (patch)
treec89a1a5e8409e826e0386e6749ba080a21eb6ab0 /Cython/Compiler/ModuleNode.py
parentb27baf0413d7ec4cbfeb694bc636e751c583a817 (diff)
downloadcython-37fb8a2d43924fd9d616e3c16718bc137c015bf0.tar.gz
MAINT: cannot use local enum in __Pyx functions
Diffstat (limited to 'Cython/Compiler/ModuleNode.py')
-rw-r--r--Cython/Compiler/ModuleNode.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py
index 026b4323f..f948cfa11 100644
--- a/Cython/Compiler/ModuleNode.py
+++ b/Cython/Compiler/ModuleNode.py
@@ -3061,17 +3061,17 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
# check_size
if not type.is_external or type.is_subclassed:
- cs = '__PYX_CHECKSIZE_STRICT'
+ cs = 0
elif type.check_size == b'min':
- cs = '__PYX_CHECKSIZE_MIN'
+ cs = 1
elif type.check_size is True:
- cs = '__PYX_CHECKSIZE_STRICT'
+ cs = 0
elif type.check_size is False:
- cs = '__PYX_CHECKSIZE_LOOSE'
+ cs = 2
else:
raise AttributeError("invalid value for check_size '%r' when compiling "
"%s.%s" % (type.check_size, module_name, type.name))
- code.putln('%s);' % cs)
+ code.putln('%d);' % cs)
code.putln(' if (!%s) %s' % (type.typeptr_cname, error_code))