]> granicus.if.org Git - onig/commitdiff
don't call onig_initialize_encoding() directly
authorK.Kosako <kosako@sofnec.co.jp>
Wed, 7 Mar 2018 03:22:43 +0000 (12:22 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Wed, 7 Mar 2018 03:22:43 +0000 (12:22 +0900)
src/reggnu.c
src/regposix.c

index 5a98c570ff61f0a4c25ee27b09c1ed4a4331a6fe..37c751999eb644ab17f5bcfb2444a73441450050 100644 (file)
@@ -137,8 +137,7 @@ re_mbcinit(int mb_code)
     break;
   }
 
-  onig_initialize(0, 0);
-  onig_initialize_encoding(enc);
+  onig_initialize(&enc, 1);
 
   onigenc_set_default_encoding(enc);
 }
index 6648d971f63b2a823f5276642ebc09149b89b227..895cf29817d076e64c0636038bfc6ac630884ba0 100644 (file)
@@ -268,8 +268,7 @@ reg_set_encoding(int mb_code)
     break;
   }
 
-  onig_initialize(0, 0);
-  onig_initialize_encoding(enc);
+  onig_initialize(&enc, 1);
 
   onigenc_set_default_encoding(enc);
 }