Default args fix for const methods. The extra methods being generated were non-const.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6624 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2004-11-02 21:22:49 +00:00
commit c5e0c0094c

View file

@ -1092,8 +1092,12 @@ static void default_arguments(Node *n) {
{
Node *new_function = new_node(Copy(nodeType(function)));
SwigType *decl = Copy(Getattr(function,"decl"));
int constqualifier = SwigType_isconst(decl);
Delete(SwigType_pop_function(decl)); /* remove the old parameter list from decl */
SwigType_add_function(decl,newparms);
if (constqualifier)
SwigType_add_qualifier(decl,"const");
Setattr(new_function,"name",Copy(Getattr(function,"name")));
Setattr(new_function,"code",Copy(Getattr(function,"code")));