Fix unnecessary and inconsistent null pointer checks
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13912 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
7299392ebb
commit
e0967f3e13
3 changed files with 238 additions and 249 deletions
|
|
@ -3472,7 +3472,7 @@ public:
|
||||||
Wrapper *w = NewWrapper();
|
Wrapper *w = NewWrapper();
|
||||||
ParmList *l = Getattr(n, "parms");
|
ParmList *l = Getattr(n, "parms");
|
||||||
bool is_void = !(Cmp(returntype, "void"));
|
bool is_void = !(Cmp(returntype, "void"));
|
||||||
String *qualified_return = NewString("");
|
String *qualified_return = 0;
|
||||||
bool pure_virtual = (!(Cmp(storage, "virtual")) && !(Cmp(value, "0")));
|
bool pure_virtual = (!(Cmp(storage, "virtual")) && !(Cmp(value, "0")));
|
||||||
int status = SWIG_OK;
|
int status = SWIG_OK;
|
||||||
bool output_director = true;
|
bool output_director = true;
|
||||||
|
|
@ -3496,9 +3496,6 @@ public:
|
||||||
|
|
||||||
imclass_dmethod = NewStringf("SwigDirector_%s", Swig_name_member(getNSpace(), classname, overloaded_name));
|
imclass_dmethod = NewStringf("SwigDirector_%s", Swig_name_member(getNSpace(), classname, overloaded_name));
|
||||||
|
|
||||||
if (returntype) {
|
|
||||||
|
|
||||||
Delete(qualified_return);
|
|
||||||
qualified_return = SwigType_rcaststr(returntype, "c_result");
|
qualified_return = SwigType_rcaststr(returntype, "c_result");
|
||||||
|
|
||||||
if (!is_void && !ignored_method) {
|
if (!is_void && !ignored_method) {
|
||||||
|
|
@ -3578,7 +3575,6 @@ public:
|
||||||
SwigType_str(returntype, 0), SwigType_namestr(c_classname), SwigType_namestr(name));
|
SwigType_str(returntype, 0), SwigType_namestr(c_classname), SwigType_namestr(name));
|
||||||
output_director = false;
|
output_director = false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Swig_director_parms_fixup(l);
|
Swig_director_parms_fixup(l);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1945,7 +1945,7 @@ public:
|
||||||
Wrapper *w = NewWrapper();
|
Wrapper *w = NewWrapper();
|
||||||
ParmList *l = Getattr(n, "parms");
|
ParmList *l = Getattr(n, "parms");
|
||||||
bool is_void = !(Cmp(returntype, "void"));
|
bool is_void = !(Cmp(returntype, "void"));
|
||||||
String *qualified_return = NewString("");
|
String *qualified_return = 0;
|
||||||
bool pure_virtual = (!(Cmp(storage, "virtual")) && !(Cmp(value, "0")));
|
bool pure_virtual = (!(Cmp(storage, "virtual")) && !(Cmp(value, "0")));
|
||||||
int status = SWIG_OK;
|
int status = SWIG_OK;
|
||||||
bool output_director = true;
|
bool output_director = true;
|
||||||
|
|
@ -1968,10 +1968,8 @@ public:
|
||||||
// we're consistent with the sym:overload name in functionWrapper. (?? when
|
// we're consistent with the sym:overload name in functionWrapper. (?? when
|
||||||
// does the overloaded method name get set?)
|
// does the overloaded method name get set?)
|
||||||
|
|
||||||
imclass_dmethod = NewStringf("SwigDirector_%s",
|
imclass_dmethod = NewStringf("SwigDirector_%s", Swig_name_member(getNSpace(), classname, overloaded_name));
|
||||||
Swig_name_member(getNSpace(), classname, overloaded_name));
|
|
||||||
|
|
||||||
if (returntype) {
|
|
||||||
qualified_return = SwigType_rcaststr(returntype, "c_result");
|
qualified_return = SwigType_rcaststr(returntype, "c_result");
|
||||||
|
|
||||||
if (!is_void && !ignored_method) {
|
if (!is_void && !ignored_method) {
|
||||||
|
|
@ -2049,7 +2047,6 @@ public:
|
||||||
SwigType_str(returntype, 0), SwigType_namestr(c_classname), SwigType_namestr(name));
|
SwigType_str(returntype, 0), SwigType_namestr(c_classname), SwigType_namestr(name));
|
||||||
output_director = false;
|
output_director = false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Swig_director_parms_fixup(l);
|
Swig_director_parms_fixup(l);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3536,7 +3536,7 @@ public:
|
||||||
Wrapper *w = NewWrapper();
|
Wrapper *w = NewWrapper();
|
||||||
ParmList *l = Getattr(n, "parms");
|
ParmList *l = Getattr(n, "parms");
|
||||||
bool is_void = !(Cmp(returntype, "void"));
|
bool is_void = !(Cmp(returntype, "void"));
|
||||||
String *qualified_return = NewString("");
|
String *qualified_return = 0;
|
||||||
bool pure_virtual = (!(Cmp(storage, "virtual")) && !(Cmp(value, "0")));
|
bool pure_virtual = (!(Cmp(storage, "virtual")) && !(Cmp(value, "0")));
|
||||||
int status = SWIG_OK;
|
int status = SWIG_OK;
|
||||||
bool output_director = true;
|
bool output_director = true;
|
||||||
|
|
@ -3567,9 +3567,6 @@ public:
|
||||||
|
|
||||||
imclass_dmethod = NewStringf("SwigDirector_%s", Swig_name_member(getNSpace(), classname, overloaded_name));
|
imclass_dmethod = NewStringf("SwigDirector_%s", Swig_name_member(getNSpace(), classname, overloaded_name));
|
||||||
|
|
||||||
if (returntype) {
|
|
||||||
|
|
||||||
Delete(qualified_return);
|
|
||||||
qualified_return = SwigType_rcaststr(returntype, "c_result");
|
qualified_return = SwigType_rcaststr(returntype, "c_result");
|
||||||
|
|
||||||
if (!is_void && (!ignored_method || pure_virtual)) {
|
if (!is_void && (!ignored_method || pure_virtual)) {
|
||||||
|
|
@ -3685,7 +3682,6 @@ public:
|
||||||
|
|
||||||
Delete(adjustedreturntypeparm);
|
Delete(adjustedreturntypeparm);
|
||||||
Delete(qualified_classname);
|
Delete(qualified_classname);
|
||||||
}
|
|
||||||
|
|
||||||
Swig_director_parms_fixup(l);
|
Swig_director_parms_fixup(l);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue