]> granicus.if.org Git - onig/commitdiff
add onig_get_tag_start/end_by_callout_num()
authorK.Kosako <kosako@sofnec.co.jp>
Fri, 2 Mar 2018 05:59:41 +0000 (14:59 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Fri, 2 Mar 2018 05:59:41 +0000 (14:59 +0900)
src/oniguruma.h
src/regparse.c

index 8f6fa39999f3037c28908cd4ccd051d010bfd5ae..a7df1d9867c0d42b5ce96589b104d2ea3bdf9d87 100644 (file)
@@ -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));
index c831cd5e03bd287755700f81da1c5c6943fd8f9e..8fc410208206a33d612994139450261d0b67b900 100644 (file)
@@ -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)