From: Robert Bradshaw Date: Wed, 22 Oct 2008 01:06:01 +0000 (-0700) Subject: handle visibility propagation X-Git-Tag: 0.9.9.2.beta~28 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a7b546537d8bb492fdd7d96ac24e1feb102857a0;p=cython.git handle visibility propagation --- diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index 4c76c259..c36cc3be 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -766,6 +766,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): dll_linkage = dll_linkage) if entry.visibility == 'private': storage_class = "static " + elif entry.visibility == 'public': + storage_class = "" else: storage_class = "%s " % Naming.extern_c_macro code.putln("%s%s; /*proto*/" % ( diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index 691e1ccf..bb805314 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -1299,8 +1299,10 @@ class CFuncDefNode(FuncDefNode): dll_linkage = None header = self.return_type.declaration_code(entity, dll_linkage = dll_linkage) - if visibility != 'private': + if visibility == 'extern': storage_class = "%s " % Naming.extern_c_macro + elif visibility == 'public': + storage_class = "" else: storage_class = "static " code.putln("%s%s %s {" % (