[PHP5] Fix PHP wrapper code generated for certain cases of

overloaded forms with default arguments.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9650 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Olly Betts 2007-03-02 19:05:45 +00:00
commit a63013152c
2 changed files with 17 additions and 0 deletions

View file

@ -1,6 +1,10 @@
Version 1.3.32 (in progress)
============================
03/02/2007: olly
[PHP5] Fix PHP wrapper code generated for certain cases of
overloaded forms with default arguments.
02/26/2007: efuzzyone
[CFFI] Patch #1656395: fixed hex and octal values bug, thanks to Arthur Smyles.

View file

@ -1643,6 +1643,19 @@ public:
Delete(arg_values[argno]);
arg_values[argno] = NewString("?");
}
} else if (arg_values[argno]) {
// This argument already has a default value in another overloaded
// form, but doesn't in this form. So don't try to do anything
// clever, just let the C wrappers resolve the overload and set the
// default values.
//
// This handling is safe, but I'm wondering if it may be overly
// conservative (FIXME) in some cases. It seems it's only bad when
// there's an overloaded form with the appropriate number of
// parameters which doesn't want the default value, but I need to
// think about this more.
Delete(arg_values[argno]);
arg_values[argno] = NewString("?");
}
p = nextSibling(p);
++argno;