Skip to content

Commit 2d03541

Browse files
committed
Treat RSTRING_END return value as a char* instead of string
`RSTRING_END` expects pointer to return https://github.com/ruby/ruby/blob/v3_4_2/include/ruby/internal/core/rstring.h#L434-L442
1 parent 33d7293 commit 2d03541

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

config/default.yml.erb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ function:
8181
<% end %>
8282

8383
pointer_hint:
84+
RSTRING_END:
85+
self: raw
8486
RSTRING_PTR:
8587
self: raw
8688
rb_data_object_make:

spec/ruby_header_parser/parser_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@
310310

311311
its(:name) { should eq "RSTRING_END" }
312312
its(:definition) { should eq "RSTRING_END(VALUE str)" }
313-
its(:typeref) { should eq typeref(type: "char", pointer: :ref) }
313+
its(:typeref) { should eq typeref(type: "char", pointer: :raw) }
314314
its(:args) { should eq args }
315315
end
316316

0 commit comments

Comments
 (0)