Skip to content

Commit 25091a6

Browse files
committed
nfi_function_from_pointer
1 parent b49e30a commit 25091a6

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/truffle/truffle/ffi_backend/function.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def initialize(return_type, param_types, function = nil, options = {}, &block)
4848
@function = function.handle.bind(@function_info.nfi_type)
4949
super(@function)
5050
elsif FFI::Pointer === function
51-
@function = Truffle::POSIX.nfi_symbol_from_pointer(function, @function_info.nfi_type)
51+
@function = Truffle::POSIX.nfi_function_from_pointer(function, @function_info.nfi_type)
5252
super(@function)
5353
elsif Proc === function || Method === function
5454
@function = function

lib/truffle/truffle/fiddle_backend.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def initialize(ptr, args, ret_type, abi = DEFAULT, name: nil)
185185
if ptr.is_a?(Closure)
186186
@function = ptr.method(:call)
187187
else
188-
ptr = Truffle::POSIX.nfi_symbol_from_pointer(ptr, signature)
188+
ptr = Truffle::POSIX.nfi_function_from_pointer(ptr, signature)
189189
@function = ptr.bind(signature)
190190
end
191191
end

src/main/ruby/truffleruby/core/posix.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def self.to_nfi_type(type)
8282
end
8383
end
8484

85-
def self.nfi_symbol_from_pointer(pointer, signature)
85+
def self.nfi_function_from_pointer(pointer, signature)
8686
lib = LIBTRUFFLEPOSIX.resolve
8787
# We have to bind each time as the signature changes - should be an offline operation
8888
lib['identity_pointer'].bind("(pointer):#{signature}").call(pointer)

0 commit comments

Comments
 (0)