Skip to content

Commit 3d37592

Browse files
committed
[GR-52132] Fix automatically "byref"-ing structs passed as pointers
1 parent 7e12fcf commit 3d37592

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/ctypes/PyCPointerTypeBuiltins.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ static PyCArgObject byref(Node inliningTarget, Object obj,
197197
parg.tag = 'P';
198198
parg.pffi_type = ffi_type_pointer;
199199
parg.obj = cdata;
200-
parg.valuePointer = cdata.b_ptr;
200+
parg.valuePointer = cdata.b_ptr.createReference();
201201
return parg;
202202
}
203203

0 commit comments

Comments
 (0)