diff --git a/SWIG/Source/Modules/lang.cxx b/SWIG/Source/Modules/lang.cxx index 58f87ecd0..bf2ca3be1 100644 --- a/SWIG/Source/Modules/lang.cxx +++ b/SWIG/Source/Modules/lang.cxx @@ -1762,8 +1762,7 @@ Language::constructorHandler(Node *n) { mrename = Swig_name_construct(symname); if (CPlusPlus) patch_parms(parms); - Swig_ConstructorToFunction(n,ClassType,none_comparison, - CPlusPlus,Getattr(n,"template") ? 0 :Extend); + Swig_ConstructorToFunction(n, ClassType, none_comparison, CPlusPlus, Getattr(n, "template") ? 0 :Extend); Setattr(n,"sym:name", mrename); functionWrapper(n); Delete(mrename); @@ -2155,6 +2154,6 @@ String * Language::getClassType() const { return ClassType; } -void Language::SetNoneComparison( String *nc ) { +void Language::setSubclassInstanceCheck(String *nc) { none_comparison = nc; } diff --git a/SWIG/Source/Modules/ocaml.cxx b/SWIG/Source/Modules/ocaml.cxx index ab293b688..b03a8e461 100755 --- a/SWIG/Source/Modules/ocaml.cxx +++ b/SWIG/Source/Modules/ocaml.cxx @@ -375,7 +375,7 @@ public: virtual int top(Node *n) { /* Set comparison with none for ConstructorToFunction */ - SetNoneComparison( NewString( "argv[0] != Val_unit" ) ); + setSubclassInstanceCheck(NewString("argv[0] != Val_unit")); /* check if directors are enabled for this module. note: this * is a "master" switch, without which no director code will be diff --git a/SWIG/Source/Modules/python.cxx b/SWIG/Source/Modules/python.cxx index f6e51fa5b..48689c14e 100644 --- a/SWIG/Source/Modules/python.cxx +++ b/SWIG/Source/Modules/python.cxx @@ -396,7 +396,7 @@ public: } /* Set comparison with none for ConstructorToFunction */ - SetNoneComparison( NewString( "$arg != Py_None" ) ); + setSubclassInstanceCheck(NewString("$arg != Py_None")); /* Initialize all of the output files */ String *outfile = Getattr(n,"outfile"); @@ -747,7 +747,7 @@ public: /* Keyword argument handling */ if (Len(pn)) { - Printf(kwargs,"\"%s\",", pn); + Printf(kwargs,"(char *) \"%s\",", pn); } else { Printf(kwargs,"\"arg%d\",", i+1); } @@ -1935,7 +1935,7 @@ public: int use_director = Swig_directorclass(n); /* - * If we wrapping the constructor of a C++ director class, prepend a new parameter + * If we're wrapping the constructor of a C++ director class, prepend a new parameter * to receive the scripting language object (e.g. 'self') * */ diff --git a/SWIG/Source/Modules/swigmod.h b/SWIG/Source/Modules/swigmod.h index 34d485839..77c6a0c97 100644 --- a/SWIG/Source/Modules/swigmod.h +++ b/SWIG/Source/Modules/swigmod.h @@ -208,7 +208,7 @@ public: int directorsEnabled() const; /* Set none comparison string */ - void SetNoneComparison( String *s ); + void setSubclassInstanceCheck(String *s); protected: /* Patch C++ pass-by-value */