From 3ecb83fc0b55874fd420888e79e6f203cf966114 Mon Sep 17 00:00:00 2001 From: Robert Stone Date: Sat, 9 Aug 2008 23:57:55 +0000 Subject: [PATCH] usage_func() fix + CHANGES.current entry to explain my past few commits. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10749 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- CHANGES.current | 3 +++ Source/Modules/perl5.cxx | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGES.current b/CHANGES.current index 56a385d57..7d1b70ca7 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -1,6 +1,9 @@ Version 1.3.37 (in progress) ============================= +2008-08-09: talby + [Perl5] Unify Perl and C portions of constructor wrappers. + 2008-08-02: wuzzeb [Chicken,Allegro] Commit Patch 2019314 Fixes a build error in chicken, and several build errors and other errors diff --git a/Source/Modules/perl5.cxx b/Source/Modules/perl5.cxx index e68b2fe5e..2e714efe5 100644 --- a/Source/Modules/perl5.cxx +++ b/Source/Modules/perl5.cxx @@ -619,7 +619,7 @@ public: Printf(f->code, " if (items < %d) {\n", num_required + num_implicits); } - Printf(f->code, " SWIG_croak(\"Usage: %s\");\n", usage_func(Char(iname), d, outer)); + Printf(f->code, " SWIG_croak(\"Usage: %s\");\n", usage_func(Char(iname), d, outer, l)); Printf(f->code, "}\n"); if (num_implicits) { @@ -1073,7 +1073,7 @@ public: /* ------------------------------------------------------------ * usage_func() * ------------------------------------------------------------ */ - char *usage_func(char *iname, SwigType *, ParmList *l) { + char *usage_func(char *iname, SwigType *, ParmList *il, ParmList *l) { static String *temp = 0; Parm *p; int i; @@ -1084,6 +1084,9 @@ public: Printf(temp, "%s(", iname); i = 0; + /* Print implicit parameters */ + for(p = il; p; p = nextSibling(p)) + Printv(temp, (i > 0 ? "," : ""), Getattr(p, "name"), NIL); /* Now go through and print normal parameters */ p = l; while (p != 0) {