Get rid of extra unnecessary blocks in common typemaps

Use "..." instead of "{...}" to avoid generating extra lines with
opening/closing curly braces, which are completely unnecessary.

Also remove an unnecessary "if" check in "in" typemap, which was
useless.

No real changes.
This commit is contained in:
Vadim Zeitlin 2019-08-06 00:24:07 +02:00
commit 8eda01fd75

View file

@ -145,14 +145,9 @@ same_action_all_primitive_types(in, "$1 = ($1_ltype) $input;", "$1 = &$input;")
$1 = *($&1_ltype) &$input;
}
%typemap(in) SWIGTYPE {
$1 = *($1_ltype *)$input;
}
%typemap(in) SWIGTYPE "$1 = *($1_ltype *)$input;"
%typemap(in) SWIGTYPE * {
if ($input)
$1 = ($1_ltype) $input;
}
%typemap(in) SWIGTYPE * "$1 = ($1_ltype) $input;"
%typemap(in) SWIGTYPE *[ANY] {
if ($input) {
@ -209,13 +204,9 @@ same_action_all_primitive_types(out, "$result = $1;", "$result = *$1;")
*($&1_ltype) &$result = $1;
}
%typemap(out) SWIGTYPE {
$result = (SwigObj*) &$1;
}
%typemap(out) SWIGTYPE "$result = (SwigObj*) &$1;"
%typemap(out) SWIGTYPE *, SWIGTYPE & {
$result = (SwigObj*) $1;
}
%typemap(out) SWIGTYPE *, SWIGTYPE & "$result = (SwigObj*) $1;"
%typemap(out) SWIGTYPE * [ANY], SWIGTYPE [ANY][ANY] {
static SwigObj **_temp = 0;