CALLOUT_TYPE_START_MARK_END_CALL = 3,
} CalloutType;
+extern CalloutType onig_get_callout_type_from_name_id(int name_id);
extern OnigCalloutFunc onig_get_callout_start_func_from_name_id(int id);
extern OnigCalloutFunc onig_get_callout_end_func_from_name_id(int id);
-extern int onig_callout_tag_table_free(void* table);
+extern int onig_callout_tag_table_free(void* table);
#endif
/* strend hash */
#ifdef USE_CALLOUT
typedef struct {
+ CalloutType type;
int in;
OnigCalloutFunc start_func;
OnigCalloutFunc end_func;
static int
set_callout_of_name_with_enc(OnigEncoding enc, UChar* name, UChar* name_end,
+ CalloutType type,
int in,
OnigCalloutFunc start_func,
OnigCalloutFunc end_func,
}
fe = CalloutNameFuncList->v + id;
+ fe->type = type;
fe->in = in;
fe->start_func = start_func;
fe->end_func = end_func;
int arg_num, OnigType arg_types[],
int opt_arg_num, OnigValue opt_defaults[])
{
- return set_callout_of_name_with_enc(0, name, name_end, in, callout, 0,
+ return set_callout_of_name_with_enc(0, name, name_end,
+ CALLOUT_TYPE_SINGLE,
+ in, callout, 0,
arg_num, arg_types, opt_arg_num, opt_defaults);
}
return r;
}
+
+extern CalloutType
+onig_get_callout_type_from_name_id(int name_id)
+{
+ return CalloutNameFuncList->v[name_id].type;
+}
+
extern OnigCalloutFunc
onig_get_callout_start_func_from_name_id(int name_id)
{