Remove unused functions from struct rb_parser_config_struct
This commit is contained in:
parent
c6c75f3399
commit
dae503874d
@ -297,12 +297,6 @@ rbool(VALUE v)
|
|||||||
return RBOOL(v);
|
return RBOOL(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
undef_p(VALUE v)
|
|
||||||
{
|
|
||||||
return RB_UNDEF_P(v);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
rtest(VALUE obj)
|
rtest(VALUE obj)
|
||||||
{
|
{
|
||||||
@ -357,18 +351,6 @@ rb_errno_ptr2(void)
|
|||||||
return rb_errno_ptr();
|
return rb_errno_ptr();
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
fixnum_p(VALUE obj)
|
|
||||||
{
|
|
||||||
return (int)RB_FIXNUM_P(obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
symbol_p(VALUE obj)
|
|
||||||
{
|
|
||||||
return (int)RB_SYMBOL_P(obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
zalloc(size_t elemsiz)
|
zalloc(size_t elemsiz)
|
||||||
{
|
{
|
||||||
@ -447,9 +429,6 @@ static const rb_parser_config_t rb_global_parser_config = {
|
|||||||
.compile_callback = rb_suppress_tracing,
|
.compile_callback = rb_suppress_tracing,
|
||||||
.reg_named_capture_assign = reg_named_capture_assign,
|
.reg_named_capture_assign = reg_named_capture_assign,
|
||||||
|
|
||||||
.fixnum_p = fixnum_p,
|
|
||||||
.symbol_p = symbol_p,
|
|
||||||
|
|
||||||
.attr_get = rb_attr_get,
|
.attr_get = rb_attr_get,
|
||||||
|
|
||||||
.ary_new = rb_ary_new,
|
.ary_new = rb_ary_new,
|
||||||
@ -457,7 +436,6 @@ static const rb_parser_config_t rb_global_parser_config = {
|
|||||||
.ary_new_from_args = rb_ary_new_from_args,
|
.ary_new_from_args = rb_ary_new_from_args,
|
||||||
.ary_unshift = rb_ary_unshift,
|
.ary_unshift = rb_ary_unshift,
|
||||||
.ary_new2 = rb_ary_new2,
|
.ary_new2 = rb_ary_new2,
|
||||||
.ary_clear = rb_ary_clear,
|
|
||||||
.ary_modify = rb_ary_modify,
|
.ary_modify = rb_ary_modify,
|
||||||
.array_len = rb_array_len,
|
.array_len = rb_array_len,
|
||||||
.array_aref = RARRAY_AREF,
|
.array_aref = RARRAY_AREF,
|
||||||
@ -586,7 +564,6 @@ static const rb_parser_config_t rb_global_parser_config = {
|
|||||||
.strtod = ruby_strtod,
|
.strtod = ruby_strtod,
|
||||||
|
|
||||||
.rbool = rbool,
|
.rbool = rbool,
|
||||||
.undef_p = undef_p,
|
|
||||||
.rtest = rtest,
|
.rtest = rtest,
|
||||||
.nil_p = nil_p,
|
.nil_p = nil_p,
|
||||||
.qnil = Qnil,
|
.qnil = Qnil,
|
||||||
|
@ -1248,9 +1248,6 @@ typedef struct rb_parser_config_struct {
|
|||||||
VALUE (*compile_callback)(VALUE (*func)(VALUE), VALUE arg);
|
VALUE (*compile_callback)(VALUE (*func)(VALUE), VALUE arg);
|
||||||
NODE *(*reg_named_capture_assign)(struct parser_params* p, VALUE regexp, const rb_code_location_t *loc);
|
NODE *(*reg_named_capture_assign)(struct parser_params* p, VALUE regexp, const rb_code_location_t *loc);
|
||||||
|
|
||||||
int (*fixnum_p)(VALUE);
|
|
||||||
int (*symbol_p)(VALUE);
|
|
||||||
|
|
||||||
/* Variable */
|
/* Variable */
|
||||||
VALUE (*attr_get)(VALUE obj, ID id);
|
VALUE (*attr_get)(VALUE obj, ID id);
|
||||||
|
|
||||||
@ -1260,7 +1257,6 @@ typedef struct rb_parser_config_struct {
|
|||||||
VALUE (*ary_new_from_args)(long n, ...);
|
VALUE (*ary_new_from_args)(long n, ...);
|
||||||
VALUE (*ary_unshift)(VALUE ary, VALUE item);
|
VALUE (*ary_unshift)(VALUE ary, VALUE item);
|
||||||
VALUE (*ary_new2)(long capa); // ary_new_capa
|
VALUE (*ary_new2)(long capa); // ary_new_capa
|
||||||
VALUE (*ary_clear)(VALUE ary);
|
|
||||||
void (*ary_modify)(VALUE ary);
|
void (*ary_modify)(VALUE ary);
|
||||||
long (*array_len)(VALUE a);
|
long (*array_len)(VALUE a);
|
||||||
VALUE (*array_aref)(VALUE, long);
|
VALUE (*array_aref)(VALUE, long);
|
||||||
@ -1409,7 +1405,6 @@ typedef struct rb_parser_config_struct {
|
|||||||
|
|
||||||
/* Misc */
|
/* Misc */
|
||||||
VALUE (*rbool)(VALUE);
|
VALUE (*rbool)(VALUE);
|
||||||
int (*undef_p)(VALUE);
|
|
||||||
int (*rtest)(VALUE obj);
|
int (*rtest)(VALUE obj);
|
||||||
int (*nil_p)(VALUE obj);
|
int (*nil_p)(VALUE obj);
|
||||||
VALUE qnil;
|
VALUE qnil;
|
||||||
|
@ -88,11 +88,6 @@
|
|||||||
#define compile_callback p->config->compile_callback
|
#define compile_callback p->config->compile_callback
|
||||||
#define reg_named_capture_assign p->config->reg_named_capture_assign
|
#define reg_named_capture_assign p->config->reg_named_capture_assign
|
||||||
|
|
||||||
#undef FIXNUM_P
|
|
||||||
#define FIXNUM_P p->config->fixnum_p
|
|
||||||
#undef SYMBOL_P
|
|
||||||
#define SYMBOL_P p->config->symbol_p
|
|
||||||
|
|
||||||
#define rb_attr_get p->config->attr_get
|
#define rb_attr_get p->config->attr_get
|
||||||
|
|
||||||
#define rb_ary_new p->config->ary_new
|
#define rb_ary_new p->config->ary_new
|
||||||
@ -102,7 +97,6 @@
|
|||||||
#define rb_ary_unshift p->config->ary_unshift
|
#define rb_ary_unshift p->config->ary_unshift
|
||||||
#undef rb_ary_new2
|
#undef rb_ary_new2
|
||||||
#define rb_ary_new2 p->config->ary_new2
|
#define rb_ary_new2 p->config->ary_new2
|
||||||
#define rb_ary_clear p->config->ary_clear
|
|
||||||
#define rb_ary_modify p->config->ary_modify
|
#define rb_ary_modify p->config->ary_modify
|
||||||
#undef RARRAY_LEN
|
#undef RARRAY_LEN
|
||||||
#define RARRAY_LEN p->config->array_len
|
#define RARRAY_LEN p->config->array_len
|
||||||
@ -245,8 +239,6 @@
|
|||||||
|
|
||||||
#undef RBOOL
|
#undef RBOOL
|
||||||
#define RBOOL p->config->rbool
|
#define RBOOL p->config->rbool
|
||||||
#undef UNDEF_P
|
|
||||||
#define UNDEF_P p->config->undef_p
|
|
||||||
#undef RTEST
|
#undef RTEST
|
||||||
#define RTEST p->config->rtest
|
#define RTEST p->config->rtest
|
||||||
#undef NIL_P
|
#undef NIL_P
|
||||||
|
Loading…
x
Reference in New Issue
Block a user