diff options
Diffstat (limited to 'sample/names.c')
-rw-r--r-- | sample/names.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sample/names.c b/sample/names.c index 9b1eb24..bf47f63 100644 --- a/sample/names.c +++ b/sample/names.c @@ -31,11 +31,12 @@ extern int main(int argc, char* argv[]) regex_t* reg; OnigErrorInfo einfo; OnigRegion *region; + OnigEncoding use_encs[1]; static UChar* pattern = (UChar* )"(?<foo>a*)(?<bar>b*)(?<foo>c*)"; static UChar* str = (UChar* )"aaabbbbcc"; - OnigEncoding use_encs[] = { ONIG_ENCODING_ASCII }; + use_encs[0] = ONIG_ENCODING_ASCII; onig_initialize(use_encs, sizeof(use_encs)/sizeof(use_encs[0])); r = onig_new(®, pattern, pattern + strlen((char* )pattern), |