summaryrefslogtreecommitdiff
path: root/sample/names.c
diff options
context:
space:
mode:
Diffstat (limited to 'sample/names.c')
-rw-r--r--sample/names.c3
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(&reg, pattern, pattern + strlen((char* )pattern),