From 613a4e98a4b02360b033c349b73f8c5f2d2f1998 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Thu, 3 Jul 2008 14:27:28 +0100 Subject: [PATCH] Cleanups. --- tests/foo.h | 1 + tests/foomodulegen-auto.py | 1 - tests/foomodulegen.py | 5 ++--- tests/foomodulegen3.py | 1 - tests/foomodulegen4.py | 1 - 5 files changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/foo.h b/tests/foo.h index 072febb..1efab91 100644 --- a/tests/foo.h +++ b/tests/foo.h @@ -599,6 +599,7 @@ class AbstractXpto { public: AbstractXpto () {} + virtual ~AbstractXpto () {} virtual void something (int x) const = 0; }; diff --git a/tests/foomodulegen-auto.py b/tests/foomodulegen-auto.py index 0a9d660..5df6564 100644 --- a/tests/foomodulegen-auto.py +++ b/tests/foomodulegen-auto.py @@ -16,7 +16,6 @@ import foomodulegen_common def my_module_gen(): out = FileCodeSink(sys.stdout) pygen_file = open(sys.argv[2], "wt") - pybindgen.write_preamble(out) module_parser = ModuleParser('foo2', '::') module = module_parser.parse([sys.argv[1]], includes=['"foo.h"'], pygen_sink=FileCodeSink(pygen_file)) pygen_file.close() diff --git a/tests/foomodulegen.py b/tests/foomodulegen.py index 425684e..66c44af 100755 --- a/tests/foomodulegen.py +++ b/tests/foomodulegen.py @@ -16,12 +16,11 @@ import foomodulegen_common def my_module_gen(out_file): - pybindgen.write_preamble(FileCodeSink(out_file)) - - print >> out_file, "#include \"foo.h\"" mod = Module('foo') + mod.add_include ('"foo.h"') + Foo = mod.add_class('Foo', automatic_type_narrowing=True) Foo.add_static_attribute('instance_count', ReturnValue.new('int')) diff --git a/tests/foomodulegen3.py b/tests/foomodulegen3.py index a65bc7d..4327061 100644 --- a/tests/foomodulegen3.py +++ b/tests/foomodulegen3.py @@ -35,7 +35,6 @@ def my_module_gen(): foomodulegen_generated.register_functions(root_module) foomodulegen_common.customize_module(root_module) - pybindgen.write_preamble(out) root_module.generate(out) diff --git a/tests/foomodulegen4.py b/tests/foomodulegen4.py index 605a9e8..86a5c75 100644 --- a/tests/foomodulegen4.py +++ b/tests/foomodulegen4.py @@ -54,7 +54,6 @@ def my_module_gen(): foomodulegen_split.register_functions(root_module) foomodulegen_common.customize_module(root_module) - #pybindgen.write_preamble(out) root_module.generate(out) out.close()