From: K.Kosako Date: Fri, 2 Mar 2018 06:04:46 +0000 (+0900) Subject: constify tag_start and tag_end in CalloutListEntry X-Git-Tag: v6.8.0~86 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2fc257f7aab4fe51ef365fed765a6858ed6a99e4;p=onig constify tag_start and tag_end in CalloutListEntry --- diff --git a/src/oniguruma.h b/src/oniguruma.h index a7df1d9..c5ce6b7 100644 --- a/src/oniguruma.h +++ b/src/oniguruma.h @@ -988,9 +988,9 @@ 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)); +const 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)); +const 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 diff --git a/src/regint.h b/src/regint.h index 86b40a1..6a84fee 100644 --- a/src/regint.h +++ b/src/regint.h @@ -260,8 +260,8 @@ typedef struct { OnigCalloutOf of; int in; int name_id; - UChar* tag_start; - UChar* tag_end; + const UChar* tag_start; + const UChar* tag_end; OnigCalloutType type; OnigCalloutFunc start_func; OnigCalloutFunc end_func; diff --git a/src/regparse.c b/src/regparse.c index 8fc4102..e4148ff 100644 --- a/src/regparse.c +++ b/src/regparse.c @@ -1601,14 +1601,14 @@ onig_get_callout_start_func_by_callout_num(regex_t* reg, int num) return e->start_func; } -extern UChar* +extern const 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* +extern const UChar* onig_get_tag_end_by_callout_num(regex_t* reg, int num) { CalloutListEntry* e = onig_reg_callout_list_at(reg, num);