From: Robert Bradshaw Date: Tue, 9 Apr 2013 18:39:06 +0000 (-0700) Subject: Const cast fix. X-Git-Tag: 0.19b2~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f376a8bfa0e5f61eb5aa46b4d818b47316cf78fc;p=platform%2Fupstream%2Fpython-cython.git Const cast fix. --- 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 == '?':