File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
lib/truffle/truffle/ffi_backend Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ Bug fixes:
9
9
* Implemented ` rb_eval_string_protect ` .
10
10
* Fixed ` rb_get_kwargs ` to correctly handle optional and rest arguments.
11
11
* Calling ` Kernel#raise ` with a raised exception will no longer set the cause of the exception to itself (#1682 ).
12
+ * Return a ` FFI::Function ` correctly for functions returning a callback.
12
13
13
14
Compatibility
14
15
Original file line number Diff line number Diff line change @@ -170,6 +170,9 @@ def free
170
170
elsif FFI ::Type ::Builtin === type and type . unsigned?
171
171
# TODO: NFI workaround
172
172
type . signed2unsigned ( value )
173
+ elsif FFI ::FunctionType === type
174
+ ptr = FFI ::Pointer . new ( Truffle ::Interop . as_pointer ( value ) )
175
+ FFI ::Function . new ( type , nil , ptr )
173
176
else
174
177
value
175
178
end
You can’t perform that action at this time.
0 commit comments