Skip to content

Commit 2a88a36

Browse files
committed
Python bindings: Do not reuse $result for pointer conversion result
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.
1 parent 355558c commit 2a88a36

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

swig/openscap.i

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@
6464
}
6565

6666
%typemap(in) void * {
67-
$result = SWIG_ConvertPtr($input,%as_voidptrptr(&$1), 0, $disown);
68-
if (!SWIG_IsOK($result)) {
69-
%argument_fail($result, "$type", $symname, $argnum);
67+
int ptrres = SWIG_ConvertPtr($input,%as_voidptrptr(&$1), 0, $disown);
68+
if (!SWIG_IsOK(ptrres)) {
69+
%argument_fail(ptrres, "$type", $symname, $argnum);
7070
}
7171
}
7272

0 commit comments

Comments
 (0)