Skip to content

Commit 3254b0b

Browse files
eileencodestenderlove
authored andcommitted
Fix ffi callback type
1 parent 8d15a90 commit 3254b0b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/prism/ffi.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ def self.load_exported_functions_from(header, *functions, callbacks)
8686
end
8787

8888
callback :pm_parse_stream_fgets_t, [:pointer, :int, :pointer], :pointer
89+
callback :pm_parse_stream_feof_t, [:pointer], :int
8990
enum :pm_string_init_result_t, %i[PM_STRING_INIT_SUCCESS PM_STRING_INIT_ERROR_GENERIC PM_STRING_INIT_ERROR_DIRECTORY]
9091
enum :pm_string_query_t, [:PM_STRING_QUERY_ERROR, -1, :PM_STRING_QUERY_FALSE, :PM_STRING_QUERY_TRUE]
9192

@@ -101,7 +102,7 @@ def self.load_exported_functions_from(header, *functions, callbacks)
101102
"pm_string_query_local",
102103
"pm_string_query_constant",
103104
"pm_string_query_method_name",
104-
[:pm_parse_stream_fgets_t]
105+
[:pm_parse_stream_fgets_t, :pm_parse_stream_feof_t]
105106
)
106107

107108
load_exported_functions_from(

0 commit comments

Comments
 (0)