From: K.Kosako Date: Fri, 9 Feb 2018 00:37:18 +0000 (+0900) Subject: add onig_get_callout_name_from_id() X-Git-Tag: v6.8.0~322 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=69e79e421e215e99ca71dff54a3784a0b05ea3d9;p=onig add onig_get_callout_name_from_id() --- diff --git a/src/oniguruma.h b/src/oniguruma.h index 47530b4..561973f 100644 --- a/src/oniguruma.h +++ b/src/oniguruma.h @@ -935,7 +935,10 @@ ONIG_EXTERN int onig_set_retraction_callout_of_code P_((OnigCalloutFunc f)); ONIG_EXTERN int onig_set_callout_of_name P_((UChar* name, UChar* name_end, OnigCalloutFunc callout, OnigCalloutFunc retraction_callout)); /* name: single-byte string */ +ONIG_EXTERN +UChar* onig_get_callout_name_from_id P_((int id)); +/* used in callout functions */ ONIG_EXTERN int onig_get_capture_range_in_callout P_((OnigCalloutArgs* args, int mem_num, int* begin, int* end)); ONIG_EXTERN diff --git a/src/regparse.c b/src/regparse.c index b1974fd..5cc7638 100644 --- a/src/regparse.c +++ b/src/regparse.c @@ -1505,6 +1505,12 @@ onig_get_retraction_callout_func_from_id(int id) return CalloutNameFuncList->v[id].retraction_callout; } +extern UChar* +onig_get_callout_name_from_id(int id) +{ + return CalloutNameFuncList->v[id].name; +} + extern int onig_callout_names_free(void) {