From 1c31ef71f3a9f772c3eda9e95497f9e0eedea2d0 Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Tue, 13 Jan 2004 01:19:48 +0000 Subject: [PATCH] fixed repeated file inclusion for dirprot mode git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5622 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Source/Modules/python.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/SWIG/Source/Modules/python.cxx b/SWIG/Source/Modules/python.cxx index 5c012b850..463105907 100644 --- a/SWIG/Source/Modules/python.cxx +++ b/SWIG/Source/Modules/python.cxx @@ -223,6 +223,10 @@ public: Swig_banner(f_directors_h); Printf(f_directors_h, "#ifndef SWIG_%s_WRAP_H_\n", module); Printf(f_directors_h, "#define SWIG_%s_WRAP_H_\n\n", module); + if (dirprot_mode()) { + Printf(f_directors_h, "#include \n"); + Printf(f_directors_h, "#include \n\n"); + } Printf(f_directors_h, "class Swig::Director;\n\n"); Swig_insert_file("director.swg", f_directors); Printf(f_directors, "\n\n"); @@ -1542,11 +1546,6 @@ public: * ------------------------------------------------------------ */ int classDirectorInit(Node *n) { - if (dirprot_mode()) { - Printf(f_directors_h, "#include \n"); - Printf(f_directors_h, "#include \n\n"); - } - String *declaration = Swig_director_declaration(n); Printf(f_directors_h, "\n"); Printf(f_directors_h, "%s\n", declaration);