]> granicus.if.org Git - onig/commitdiff
constify members in RegexExt
authorK.Kosako <kosako@sofnec.co.jp>
Fri, 2 Mar 2018 07:47:01 +0000 (16:47 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Fri, 2 Mar 2018 07:47:01 +0000 (16:47 +0900)
src/regcomp.c
src/regint.h

index 2696027b217a1db46bf795c632c388e42b6dea3b..8026e79a19c3f27959dd40eceb6bfb95288ce928 100644 (file)
@@ -5888,7 +5888,7 @@ free_regex_ext(RegexExt* ext)
 {
   if (IS_NOT_NULL(ext)) {
     if (IS_NOT_NULL(ext->pattern))
-      xfree(ext->pattern);
+      xfree((void* )ext->pattern);
 
 #ifdef USE_CALLOUT
     if (IS_NOT_NULL(ext->tag_table))
index bb39de88d4d1c06d89e1fd54ca372d52759ef27a..6f43041642472c991d17a0a0746d0544032eb2fa 100644 (file)
@@ -282,8 +282,8 @@ typedef struct {
 #endif
 
 typedef struct {
-  UChar* pattern;
-  UChar* pattern_end;
+  const UChar* pattern;
+  const UChar* pattern_end;
 #ifdef USE_CALLOUT
   void*  tag_table;
   int    callout_num;