Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ function:
4: array
rb_funcallv_public:
4: array
rb_gc_register_address:
1: in_ref
rb_gc_unregister_address:
1: in_ref
rb_get_values_at:
5: function
rb_glob:
Expand Down
30 changes: 30 additions & 0 deletions spec/ruby_header_parser/parser_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,36 @@
its(:typeref) { should eq typeref(type: "void") }
its(:args) { should eq args }
end

context "rb_gc_register_address" do
subject { definitions.find { |d| d.name == "rb_gc_register_address" } }

let(:args) do
[
argument(type: "VALUE", name: "valptr", pointer: :in_ref),
]
end

its(:name) { should eq "rb_gc_register_address" }
its(:definition) { should eq "void rb_gc_register_address(VALUE *valptr)" }
its(:typeref) { should eq typeref(type: "void") }
its(:args) { should eq args }
end

context "rb_gc_unregister_address" do
subject { definitions.find { |d| d.name == "rb_gc_unregister_address" } }

let(:args) do
[
argument(type: "VALUE", name: "valptr", pointer: :in_ref),
]
end

its(:name) { should eq "rb_gc_unregister_address" }
its(:definition) { should eq "void rb_gc_unregister_address(VALUE *valptr)" }
its(:typeref) { should eq typeref(type: "void") }
its(:args) { should eq args }
end
end

describe "#extract_static_inline_function_definitions" do
Expand Down
Loading