Removed a Py_None from cwrap.c.
Added SetNoneComparison in lang.cxx, which allows the language module to specify how to determine whether the empty argument was given for the 'self' pointer. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4473 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
e3d8bf0d68
commit
636daff4e1
4 changed files with 24 additions and 5 deletions
|
|
@ -201,6 +201,7 @@ int Dispatcher::namespaceDeclaration(Node *n) { return defaultHandler(n); }
|
|||
Language::Language() {
|
||||
symbols = NewHash();
|
||||
classtypes = NewHash();
|
||||
none_comparison = NewString("$arg != 0");
|
||||
overloading = 0;
|
||||
multiinput = 0;
|
||||
directors = 0;
|
||||
|
|
@ -1759,7 +1760,8 @@ Language::constructorHandler(Node *n) {
|
|||
|
||||
mrename = Swig_name_construct(symname);
|
||||
if (CPlusPlus) patch_parms(parms);
|
||||
Swig_ConstructorToFunction(n,ClassType,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);
|
||||
|
|
@ -1779,7 +1781,8 @@ Language::copyconstructorHandler(Node *n) {
|
|||
Parm *parms = Getattr(n,"parms");
|
||||
if (CPlusPlus) patch_parms(parms);
|
||||
mrename = Swig_name_copyconstructor(symname);
|
||||
Swig_ConstructorToFunction(n,ClassType, 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);
|
||||
|
|
@ -2149,3 +2152,7 @@ String * Language::getClassPrefix() const {
|
|||
String * Language::getClassType() const {
|
||||
return ClassType;
|
||||
}
|
||||
|
||||
void Language::SetNoneComparison( String *nc ) {
|
||||
none_comparison = nc;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue