diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index 70d3b21479e839c08bb01d3849b61f0d2e46845e..a254b657a6f0551d1349922e224cadc89a8b9906 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -351,7 +351,7 @@ class CFuncDeclaratorNode(CDeclaratorNode): return_type, func_type_args, self.has_varargs, exception_value = exc_val, exception_check = exc_check, calling_convention = self.base.calling_convention, - nogil = self.nogil, with_gil = self.with_gil) + nogil = self.nogil, with_gil = self.with_gil, is_overridable = self.overridable) return self.base.analyse(func_type, env) diff --git a/Cython/Compiler/Parsing.py b/Cython/Compiler/Parsing.py index bd4b0eb7b12dee2c151f6487ba10365326be1e1a..47f8c4756ac2cbc1540ca945f03187030cd8a02f 100644 --- a/Cython/Compiler/Parsing.py +++ b/Cython/Compiler/Parsing.py @@ -1300,7 +1300,7 @@ def p_statement(s, level, cdef_flag = 0, visibility = 'private', api = 0): if level not in ('module', 'module_pxd'): s.error("ctypedef statement not allowed here") if api: - error(s.pos, "'api' not allowed with 'ctypedef'") + error(s.position(), "'api' not allowed with 'ctypedef'") return p_ctypedef_statement(s, level, visibility, api) elif s.sy == 'DEF': return p_DEF_statement(s) @@ -1859,6 +1859,7 @@ def p_c_func_or_var_declaration(s, level, pos, visibility = 'private', api = 0, modifiers = p_c_modifiers(s) base_type = p_c_base_type(s) declarator = p_c_declarator(s, cmethod_flag = cmethod_flag, assignable = 1, nonempty = 1) + declarator.overridable = overridable if s.sy == ':': if level not in ('module', 'c_class'): s.error("C function definition not allowed here") @@ -1888,7 +1889,8 @@ def p_c_func_or_var_declaration(s, level, pos, visibility = 'private', api = 0, base_type = base_type, declarators = declarators, in_pxd = level == 'module_pxd', - api = api) + api = api, + overridable = overridable) return result def p_ctypedef_statement(s, level, visibility = 'private', api = 0):