From 59ec7599a1d57b6078453eb6476ead44aae37033 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sat, 10 Apr 2010 15:09:49 +0200 Subject: [PATCH] do not leak C++ namespace into outer parser scope when parsing 'cdef extern' blocks --- Cython/Compiler/Parsing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.26.2