提交 34737cd2 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Enclose the op structs within an anonymous namespace to hide their symbols.

上级 3279427b
...@@ -255,6 +255,7 @@ def struct_gen(args, struct_builders, blocks, sub): ...@@ -255,6 +255,7 @@ def struct_gen(args, struct_builders, blocks, sub):
# TODO: add some error checking to make sure storage_<x> are # TODO: add some error checking to make sure storage_<x> are
# 1-element lists and __ERROR is a 3-elements list. # 1-element lists and __ERROR is a 3-elements list.
struct_code = """ struct_code = """
namespace {
struct %(name)s { struct %(name)s {
PyObject* __ERROR; PyObject* __ERROR;
...@@ -287,6 +288,7 @@ def struct_gen(args, struct_builders, blocks, sub): ...@@ -287,6 +288,7 @@ def struct_gen(args, struct_builders, blocks, sub):
%(do_return)s %(do_return)s
} }
}; };
}
""" % sub """ % sub
return struct_code return struct_code
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论