Commit a7b54653 authored by Robert Bradshaw's avatar Robert Bradshaw

handle visibility propagation

parent 3779be3d
......@@ -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*/" % (
......
......@@ -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 {" % (
......
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