summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-06-12 20:06:19 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-06-12 20:22:01 +0900
commit81836c6cb9fceb4cc8e9e95317a6cbb3d0ad181a (patch)
tree076b1b0e2f76d749782ae1d689943902950e01e1
parent41035273d474aac9b6e847d1d5b92e56c84b1f6d (diff)
Fix duplicate symbol errors when statically linking ripper
-rw-r--r--internal/parse.h5
-rw-r--r--parse.y2
2 files changed, 6 insertions, 1 deletions
diff --git a/internal/parse.h b/internal/parse.h
index 9e257cf39d..c66c8df7b6 100644
--- a/internal/parse.h
+++ b/internal/parse.h
@@ -84,10 +84,15 @@ rb_ast_t* rb_ruby_parser_compile_file_path(rb_parser_t *p, VALUE fname, VALUE fi
void rb_ruby_parser_keep_tokens(rb_parser_t *p);
rb_ast_t* rb_ruby_parser_compile_generic(rb_parser_t *p, VALUE (*lex_gets)(VALUE, int), VALUE fname, VALUE input, int start);
rb_ast_t* rb_ruby_parser_compile_string_path(rb_parser_t *p, VALUE f, VALUE s, int line);
+
+RUBY_SYMBOL_EXPORT_BEGIN
+
VALUE rb_ruby_parser_encoding(rb_parser_t *p);
int rb_ruby_parser_end_seen_p(rb_parser_t *p);
int rb_ruby_parser_set_yydebug(rb_parser_t *p, int flag);
+RUBY_SYMBOL_EXPORT_END
+
int rb_reg_named_capture_assign_iter_impl(struct parser_params *p, const char *s, long len, rb_encoding *enc, NODE **succ_block, const rb_code_location_t *loc);
#ifdef RIPPER
diff --git a/parse.y b/parse.y
index 82ea9a0750..e5182639c9 100644
--- a/parse.y
+++ b/parse.y
@@ -13997,7 +13997,6 @@ rb_strterm_mark(VALUE obj)
}
}
#endif /* !UNIVERSAL_PARSER */
-#endif /* !RIPPER */
VALUE
rb_ruby_parser_encoding(rb_parser_t *p)
@@ -14017,6 +14016,7 @@ rb_ruby_parser_set_yydebug(rb_parser_t *p, int flag)
p->debug = flag;
return flag;
}
+#endif /* !RIPPER */
#ifdef RIPPER
int