From f376a8bfa0e5f61eb5aa46b4d818b47316cf78fc Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Tue, 9 Apr 2013 11:39:06 -0700 Subject: [PATCH] Const cast fix. --- Cython/Compiler/Parsing.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Cython/Compiler/Parsing.py b/Cython/Compiler/Parsing.py index e3e57fb..86006d0 100644 --- a/Cython/Compiler/Parsing.py +++ b/Cython/Compiler/Parsing.py @@ -301,8 +301,10 @@ def p_typecast(s): s.next() base_type = p_c_base_type(s) is_memslice = isinstance(base_type, Nodes.MemoryViewSliceTypeNode) - is_template =isinstance(base_type, Nodes.TemplatedTypeNode) - if not is_memslice and not is_template and base_type.name is None: + is_template = isinstance(base_type, Nodes.TemplatedTypeNode) + is_const = isinstance(base_type, Nodes.CConstTypeNode) + if (not is_memslice and not is_template and not is_const + and base_type.name is None): s.error("Unknown type") declarator = p_c_declarator(s, empty = 1) if s.sy == '?': -- 2.7.4