From ef7e4f5bf823a1ffc36f6909e0a329cba757cf33 Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Mon, 18 Aug 2008 15:46:19 +0100 Subject: [PATCH] fix double initialization of the main section code sink --- pybindgen/module.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pybindgen/module.py b/pybindgen/module.py index 3d42560..c10ffe2 100644 --- a/pybindgen/module.py +++ b/pybindgen/module.py @@ -134,6 +134,7 @@ class _MultiSectionSinkManager(_SinkManager): self.multi_section_factory.get_main_code_sink().writeln( "#include %s" % self.multi_section_factory.get_common_header_include()) self._already_initialized_sections = {} + self._already_initialized_sections['__main__'] = True def get_code_sink_for_wrapper(self, wrapper): header_sink = self.multi_section_factory.get_common_header_code_sink()