Skip to content

Commit

Permalink
Remove "internal/re.h"
Browse files Browse the repository at this point in the history
  • Loading branch information
yui-knk committed Apr 13, 2023
1 parent 31910e3 commit b8ce291
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions external/parse.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ typedef struct rb_parser_config_struct {
// VALUE rb_syntax_error_append(VALUE, VALUE, int, int, rb_encoding*, const char*, va_list);
VALUE (*syntax_error_append)(VALUE, VALUE, int, int, const void*, const char*, va_list);

/* Re */
VALUE (*reg_compile)(VALUE str, int options, const char *sourcefile, int sourceline);
VALUE (*reg_check_preprocess)(VALUE str);

} rb_parser_config_t;

typedef struct parser_params rb_parser_t;
Expand Down
4 changes: 3 additions & 1 deletion parse.y
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ struct lex_context;
#include "internal/compilers.h"
#include "internal/encoding.h"
#include "internal/imemo.h"
#include "internal/re.h"
#include "internal/symbol.h"
#include "internal/variable.h"
#include "probes.h"
Expand All @@ -63,6 +62,7 @@ struct lex_context;
#include "internal/hash.h"
#include "internal/io.h"
#include "internal/rational.h"
#include "internal/re.h"
#include "internal/thread.h"

#endif
Expand Down Expand Up @@ -154,6 +154,8 @@ RBIMPL_WARNING_POP()
#define rb_builtin_class_name p->config.builtin_class_name
#define rb_syntax_error_append p->config.syntax_error_append

#define rb_reg_compile p->config.reg_compile
#define rb_reg_check_preprocess p->config.reg_check_preprocess

#endif

Expand Down
4 changes: 4 additions & 0 deletions ruby_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "internal/io.h"
#include "internal/parse.h"
#include "internal/rational.h"
#include "internal/re.h"
#include "internal/ruby_parser.h"
#include "internal/string.h"
#include "internal/thread.h"
Expand Down Expand Up @@ -166,6 +167,9 @@ rb_parser_config_initialize(rb_parser_config_t *config)

config->builtin_class_name = rb_builtin_class_name;
config->syntax_error_append = syntax_error_append;

config->reg_compile = rb_reg_compile;
config->reg_check_preprocess = rb_reg_check_preprocess;
}

VALUE
Expand Down

0 comments on commit b8ce291

Please sign in to comment.