From: K.Kosako Date: Fri, 2 Mar 2018 05:59:41 +0000 (+0900) Subject: add onig_get_tag_start/end_by_callout_num() X-Git-Tag: v6.8.0~87 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eda05b0b189797d5b87ccba63df9bb2570dd86be;p=onig add onig_get_tag_start/end_by_callout_num() --- diff --git a/src/oniguruma.h b/src/oniguruma.h index 8f6fa39..a7df1d9 100644 --- a/src/oniguruma.h +++ b/src/oniguruma.h @@ -988,6 +988,10 @@ unsigned long onig_get_retry_counter_by_callout_args P_((OnigCalloutArgs* args)) ONIG_EXTERN int onig_callout_tag_is_exist_at_callout_num P_((OnigRegex reg, int callout_num)); ONIG_EXTERN +UChar* onig_get_tag_start_by_callout_num P_((OnigRegex reg, int num)); +ONIG_EXTERN +UChar* onig_get_tag_end_by_callout_num P_((OnigRegex reg, int num)); +ONIG_EXTERN int onig_get_callout_data_by_callout_num_dont_clear_old P_((OnigRegex reg, OnigMatchParam* mp, int num, int slot, OnigType* type, OnigValue* val)); ONIG_EXTERN int onig_get_callout_data_by_callout_num P_((OnigRegex reg, OnigMatchParam* mp, int num, int slot, OnigType* type, OnigValue* val)); diff --git a/src/regparse.c b/src/regparse.c index c831cd5..8fc4102 100644 --- a/src/regparse.c +++ b/src/regparse.c @@ -1601,6 +1601,20 @@ onig_get_callout_start_func_by_callout_num(regex_t* reg, int num) return e->start_func; } +extern UChar* +onig_get_tag_start_by_callout_num(regex_t* reg, int num) +{ + CalloutListEntry* e = onig_reg_callout_list_at(reg, num); + return e->tag_start; +} + +extern UChar* +onig_get_tag_end_by_callout_num(regex_t* reg, int num) +{ + CalloutListEntry* e = onig_reg_callout_list_at(reg, num); + return e->tag_end; +} + extern OnigCalloutType onig_get_callout_type_by_name_id(int name_id)