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:
parent
70bc33a3be
commit
8eda01fd75
1 changed files with 4 additions and 13 deletions
17
Lib/c/c.swg
17
Lib/c/c.swg
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue