Skip to content

Commit

Permalink
Python bindings: Do not reuse $result for pointer conversion result
Browse files Browse the repository at this point in the history
The $result variable may be a pointer, but SWIG_ConvertPtr returns
an int.  This change avoids a compilation failure with current
compilers due to a C type error.
  • Loading branch information
fweimer-rh committed Jan 3, 2024
1 parent 355558c commit 2a88a36
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions swig/openscap.i
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@
}

%typemap(in) void * {
$result = SWIG_ConvertPtr($input,%as_voidptrptr(&$1), 0, $disown);
if (!SWIG_IsOK($result)) {
%argument_fail($result, "$type", $symname, $argnum);
int ptrres = SWIG_ConvertPtr($input,%as_voidptrptr(&$1), 0, $disown);
if (!SWIG_IsOK(ptrres)) {
%argument_fail(ptrres, "$type", $symname, $argnum);
}
}

Expand Down

0 comments on commit 2a88a36

Please sign in to comment.