Commit 59ec7599 authored by Stefan Behnel's avatar Stefan Behnel

do not leak C++ namespace into outer parser scope when parsing 'cdef extern' blocks

parent b106213b
...@@ -2186,10 +2186,10 @@ def p_cdef_extern_block(s, pos, ctx): ...@@ -2186,10 +2186,10 @@ def p_cdef_extern_block(s, pos, ctx):
s.next() s.next()
else: else:
_, include_file = p_string_literal(s) _, include_file = p_string_literal(s)
ctx = ctx(cdef_flag = 1, visibility = 'extern')
if s.systring == "namespace": if s.systring == "namespace":
s.next() s.next()
ctx.namespace = p_string_literal(s)[1] ctx.namespace = p_string_literal(s)[1]
ctx = ctx(cdef_flag = 1, visibility = 'extern')
if p_nogil(s): if p_nogil(s):
ctx.nogil = 1 ctx.nogil = 1
body = p_suite(s, ctx) body = p_suite(s, ctx)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment