From: Stefan Behnel Date: Sat, 10 Apr 2010 13:09:49 +0000 (+0200) Subject: do not leak C++ namespace into outer parser scope when parsing 'cdef extern' blocks X-Git-Tag: 0.13.beta0~227 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=59ec7599a1d57b6078453eb6476ead44aae37033;p=cython.git do not leak C++ namespace into outer parser scope when parsing 'cdef extern' blocks --- diff --git a/Cython/Compiler/Parsing.py b/Cython/Compiler/Parsing.py index 35276bcd..2f1f7b12 100644 --- a/Cython/Compiler/Parsing.py +++ b/Cython/Compiler/Parsing.py @@ -2186,10 +2186,10 @@ def p_cdef_extern_block(s, pos, ctx): s.next() else: _, include_file = p_string_literal(s) + ctx = ctx(cdef_flag = 1, visibility = 'extern') if s.systring == "namespace": s.next() ctx.namespace = p_string_literal(s)[1] - ctx = ctx(cdef_flag = 1, visibility = 'extern') if p_nogil(s): ctx.nogil = 1 body = p_suite(s, ctx)