Skip to content

Commit 51b66c4

Browse files
committed
avoid a leak of a PythonObject into the AST
1 parent 38c4eba commit 51b66c4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

graalpython/lib-graalpython/ctypes.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,7 @@ class CFunctionType(_CFuncPtr):
196196
return CFunctionType
197197

198198

199-
_cast_addr = 0xFF00000000000000
199+
_cast_addr = 0xFF0000000000000 << 4 # avoid freezing a constant PInt into the AST
200200
_cast = PYFUNCTYPE(py_object, c_void_p, py_object, py_object)(_cast_addr)
201201
def cast(obj, typ):
202202
return _cast(obj, obj, typ)
203-

0 commit comments

Comments
 (0)