Skip to content

Commit 50144bf

Browse files
committed
Convert more polyglot_invoke calls to new macro.
1 parent 1afe4a0 commit 50144bf

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/main/c/cext/ruby.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ void rb_insecure_operation(void) {
140140
}
141141

142142
int rb_safe_level(void) {
143-
return polyglot_as_i32(polyglot_invoke(RUBY_CEXT, "rb_safe_level"));
143+
return polyglot_as_i32(RUBY_CEXT_INVOKE_NO_WRAP("rb_safe_level"));
144144
}
145145

146146
void rb_set_safe_level_force(int level) {
@@ -392,7 +392,7 @@ const char *rb_sourcefile(void) {
392392
}
393393

394394
int rb_sourceline(void) {
395-
return polyglot_as_i32(polyglot_invoke(RUBY_CEXT, "rb_sourceline"));
395+
return polyglot_as_i32(RUBY_CEXT_INVOKE_NO_WRAP("rb_sourceline"));
396396
}
397397

398398
int rb_method_boundp(VALUE klass, ID id, int ex) {
@@ -987,7 +987,7 @@ rb_encoding *rb_locale_encoding(void) {
987987
}
988988

989989
int rb_locale_encindex(void) {
990-
return polyglot_as_i32(polyglot_invoke(RUBY_CEXT, "rb_locale_encindex"));
990+
return polyglot_as_i32(RUBY_CEXT_INVOKE_NO_WRAP("rb_locale_encindex"));
991991
}
992992

993993
rb_encoding *rb_filesystem_encoding(void) {
@@ -999,7 +999,7 @@ rb_encoding *rb_filesystem_encoding(void) {
999999
}
10001000

10011001
int rb_filesystem_encindex(void) {
1002-
return polyglot_as_i32(polyglot_invoke(RUBY_CEXT, "rb_filesystem_encindex"));
1002+
return polyglot_as_i32(RUBY_CEXT_INVOKE_NO_WRAP("rb_filesystem_encindex"));
10031003
}
10041004

10051005
rb_encoding *get_encoding(VALUE string) {
@@ -1069,7 +1069,7 @@ rb_encoding *rb_ascii8bit_encoding(void) {
10691069
}
10701070

10711071
int rb_ascii8bit_encindex(void) {
1072-
return polyglot_as_i32(polyglot_invoke(RUBY_CEXT, "rb_ascii8bit_encindex"));
1072+
return polyglot_as_i32(RUBY_CEXT_INVOKE_NO_WRAP("rb_ascii8bit_encindex"));
10731073
}
10741074

10751075
rb_encoding *rb_usascii_encoding(void) {
@@ -1088,15 +1088,15 @@ void rb_must_asciicompat(VALUE str) {
10881088
}
10891089

10901090
int rb_usascii_encindex(void) {
1091-
return polyglot_as_i32(polyglot_invoke(RUBY_CEXT, "rb_usascii_encindex"));
1091+
return polyglot_as_i32(RUBY_CEXT_INVOKE_NO_WRAP("rb_usascii_encindex"));
10921092
}
10931093

10941094
rb_encoding *rb_utf8_encoding(void) {
10951095
return rb_to_encoding(RUBY_CEXT_INVOKE("utf8_encoding"));
10961096
}
10971097

10981098
int rb_utf8_encindex(void) {
1099-
return polyglot_as_i32(polyglot_invoke(RUBY_CEXT, "rb_utf8_encindex"));
1099+
return polyglot_as_i32(RUBY_CEXT_INVOKE_NO_WRAP("rb_utf8_encindex"));
11001100
}
11011101

11021102
enum ruby_coderange_type RB_ENC_CODERANGE(VALUE obj) {

0 commit comments

Comments
 (0)