mirror of https://github.com/swig/swig
Consolidate isvoid handling in C#, D, Java
This commit is contained in:
parent
1e2b0b8079
commit
ce2bb71a48
|
@ -827,7 +827,7 @@ public:
|
|||
Swig_warning(WARN_CSHARP_TYPEMAP_CSTYPE_UNDEF, input_file, line_number, "No imtype typemap defined for %s\n", SwigType_str(returntype, 0));
|
||||
}
|
||||
|
||||
is_void_return = (Cmp(c_return_type, "void") == 0);
|
||||
is_void_return = Cmp(c_return_type, "void") == 0;
|
||||
if (!is_void_return)
|
||||
Wrapper_add_localv(f, "jresult", c_return_type, "jresult", NIL);
|
||||
|
||||
|
@ -1035,8 +1035,7 @@ public:
|
|||
/* Substitute the cleanup code */
|
||||
Replaceall(f->code, "$cleanup", cleanup);
|
||||
|
||||
bool isvoid = !Cmp(returntype, "void");
|
||||
Replaceall(f->code, "$isvoid", isvoid ? "1" : "0");
|
||||
Replaceall(f->code, "$isvoid", is_void_return ? "1" : "0");
|
||||
|
||||
/* Substitute the function name */
|
||||
Replaceall(f->code, "$symname", symname);
|
||||
|
|
|
@ -1801,8 +1801,7 @@ public:
|
|||
/* Substitute the cleanup code */
|
||||
Replaceall(f->code, "$cleanup", cleanup);
|
||||
|
||||
bool isvoid = !Cmp(returntype, "void");
|
||||
Replaceall(f->code, "$isvoid", isvoid ? "1" : "0");
|
||||
Replaceall(f->code, "$isvoid", is_void_return ? "1" : "0");
|
||||
|
||||
/* Substitute the function name */
|
||||
Replaceall(f->code, "$symname", symname);
|
||||
|
|
|
@ -908,7 +908,7 @@ public:
|
|||
Swig_warning(WARN_JAVA_TYPEMAP_JTYPE_UNDEF, input_file, line_number, "No jtype typemap defined for %s\n", SwigType_str(returntype, 0));
|
||||
}
|
||||
|
||||
is_void_return = (Cmp(c_return_type, "void") == 0);
|
||||
is_void_return = Cmp(c_return_type, "void") == 0;
|
||||
if (!is_void_return)
|
||||
Wrapper_add_localv(f, "jresult", c_return_type, "jresult = 0", NIL);
|
||||
|
||||
|
@ -1130,8 +1130,7 @@ public:
|
|||
/* Substitute the cleanup code */
|
||||
Replaceall(f->code, "$cleanup", cleanup);
|
||||
|
||||
bool isvoid = !Cmp(returntype, "void");
|
||||
Replaceall(f->code, "$isvoid", isvoid ? "1" : "0");
|
||||
Replaceall(f->code, "$isvoid", is_void_return ? "1" : "0");
|
||||
|
||||
/* Substitute the function name */
|
||||
Replaceall(f->code, "$symname", symname);
|
||||
|
|
Loading…
Reference in New Issue