From 0919c0de1ea28dc60ca012b18c8b4bf0e76912db Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Mon, 25 Sep 2006 21:46:42 +0000 Subject: [PATCH] Remove debug. Fix #1505591 Throwing exceptions in extended directors git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9360 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/Modules/ruby.cxx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Source/Modules/ruby.cxx b/Source/Modules/ruby.cxx index f792c8441..391b5a409 100644 --- a/Source/Modules/ruby.cxx +++ b/Source/Modules/ruby.cxx @@ -464,12 +464,13 @@ public: Printf(f_directors_h, "namespace Swig {\n"); Printf(f_directors_h, " class Director;\n"); Printf(f_directors_h, "}\n\n"); - Swig_insert_file("director.swg", f_directors); + Printf(f_directors, "\n\n"); Printf(f_directors, "/* ---------------------------------------------------\n"); Printf(f_directors, " * C++ director class methods\n"); Printf(f_directors, " * --------------------------------------------------- */\n\n"); - Printf(f_directors, "#include \"%s\"\n\n", Swig_file_filename(outfile_h)); + if (outfile_h) + Printf(f_directors, "#include \"%s\"\n\n", Swig_file_filename(outfile_h)); Delete(module_macro); } @@ -508,6 +509,11 @@ public: Language::top(n); + if (directorsEnabled()) { + // Insert director runtime into the f_runtime file (make it occur before %header section) + Swig_insert_file("director.swg", f_runtime); + } + /* Finish off our init function */ Printf(f_init,"}\n"); SwigType_emit_type_table(f_runtime,f_wrappers); @@ -711,16 +717,13 @@ public: Append(temp,iname); /* Check for _set or _get at the end of the name. */ if (Len(temp) > 4) { - Printf(stdout, "[%s] temp\n", temp); const char *p = Char(temp) + (Len(temp) - 4); - Printf(stdout, "[%s] p\n", p); if (strcmp(p, "_set") == 0) { Delslice(temp, Len(temp) - 4, DOH_END); Append(temp, "="); } else if (strcmp(p, "_get") == 0) { Delslice(temp, Len(temp) - 4, DOH_END); } - Printf(stdout, "[%s] temp after\n", temp); } if (multipleInheritance) { Printv(klass->init, tab4, "rb_define_method(", klass->mImpl, ", \"",