]> granicus.if.org Git - onig/commitdiff
constify tag_start and tag_end in CalloutListEntry
authorK.Kosako <kosako@sofnec.co.jp>
Fri, 2 Mar 2018 06:04:46 +0000 (15:04 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Fri, 2 Mar 2018 06:04:46 +0000 (15:04 +0900)
src/oniguruma.h
src/regint.h
src/regparse.c

index a7df1d9867c0d42b5ce96589b104d2ea3bdf9d87..c5ce6b7086fb513a4b7fbf748ca0dc705d19fc62 100644 (file)
@@ -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
index 86b40a1d932357c9c32deef610a7b65a3313f848..6a84fee8012dc464558dba71aa8246d1b2e95e69 100644 (file)
@@ -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;
index 8fc410208206a33d612994139450261d0b67b900..e4148ff2f28c63bc6ea6d25697853e3b03d43fa8 100644 (file)
@@ -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);