summaryrefslogtreecommitdiff
path: root/enc
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2014-12-14 12:57:23 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2014-12-14 12:57:23 +0100
commit27195517c5bfdbc8821bfd3c957b6c35d6c13544 (patch)
tree1637434994d8d32ac4c13729ff756be80c279b10 /enc
parent271484c6837d9f5a36501dfb98494ae6eaae43aa (diff)
parent766e109fd638ef1eac33717b52e04a351da46483 (diff)
Merge tag 'upstream/5.9.6'
Upstream version 5.9.6
Diffstat (limited to 'enc')
-rw-r--r--enc/unicode.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/enc/unicode.c b/enc/unicode.c
index af7a86e..e13429f 100644
--- a/enc/unicode.c
+++ b/enc/unicode.c
@@ -2,7 +2,7 @@
unicode.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2013 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -10891,6 +10891,21 @@ static st_table* Unfold2Table;
static st_table* Unfold3Table;
static int CaseFoldInited = 0;
+
+extern void onigenc_end_unicode(void)
+{
+ THREAD_ATOMIC_START;
+
+ if (FoldTable != 0) st_free_table(FoldTable);
+ if (Unfold1Table != 0) st_free_table(Unfold1Table);
+ if (Unfold2Table != 0) st_free_table(Unfold2Table);
+ if (Unfold3Table != 0) st_free_table(Unfold3Table);
+
+ CaseFoldInited = 0;
+
+ THREAD_ATOMIC_END;
+}
+
static int init_case_fold_table(void)
{
const CaseFold_11_Type *p;
@@ -10952,6 +10967,9 @@ static int init_case_fold_table(void)
st_add_direct(Unfold3Table, (st_data_t )p3->from, (st_data_t )(&p3->to));
}
+
+ onig_add_end_call(onigenc_end_unicode);
+
CaseFoldInited = 1;
THREAD_ATOMIC_END;
return 0;