summaryrefslogtreecommitdiff
path: root/universal_parser.c
diff options
context:
space:
mode:
authorS-H-GAMELINKS <[email protected]>2024-09-21 08:39:42 +0900
committerNobuyoshi Nakada <[email protected]>2024-09-22 12:22:20 +0900
commit95d26ee41e136088560caa04943d177342795b5b (patch)
tree827b8285eb8465e874ab73ad45c45164b2d5807e /universal_parser.c
parent9f574fa12f0cbe9d7aa4a11a6c7055ed32f02822 (diff)
Reuse dedent_string function in rb_ruby_ripper_dedent_string function
This change is reduce Ruby C API dependency for Universal Parser. Reuse dedent_string functions in rb_ruby_ripper_dedent_string functions and remove dependencies on rb_str_modify and rb_str_set_len from the parser.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/11658
Diffstat (limited to 'universal_parser.c')
-rw-r--r--universal_parser.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/universal_parser.c b/universal_parser.c
index d2105a9465..ee3be70edc 100644
--- a/universal_parser.c
+++ b/universal_parser.c
@@ -26,10 +26,6 @@
#define rb_strlen_lit(str) (sizeof(str "") - 1)
#undef FIXNUM_MAX
#define FIXNUM_MAX (LONG_MAX / 2)
-#undef RSTRING_GETMEM
-#define RSTRING_GETMEM(str, ptrvar, lenvar) \
- ((ptrvar) = RSTRING_PTR(str), \
- (lenvar) = RSTRING_LEN(str))
/* parser_st */
#define st_table parser_st_table
@@ -119,8 +115,6 @@
#define rb_str_catf p->config->str_catf
#undef rb_str_cat_cstr
#define rb_str_cat_cstr p->config->str_cat_cstr
-#define rb_str_modify p->config->str_modify
-#define rb_str_set_len p->config->str_set_len
#define rb_str_cat p->config->str_cat
#define rb_str_resize p->config->str_resize
#undef rb_str_new