summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkosako <kosako@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-02-12 15:05:19 (GMT)
committerkosako <kosako@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-02-12 15:05:19 (GMT)
commitc37c5419d251c5e72d413a4759eac2a34c1de3e4 (patch)
treedefb2b9208a62f100efda31a9dce17e1415b32c1
parent1232adbcf92e014d771339d6e2ae71c42e1a4b0f (diff)
merge Oniguruma 4.0.1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog14
-rw-r--r--oniguruma.h2
-rw-r--r--regcomp.c10
-rw-r--r--regexec.c4
-rw-r--r--regint.h4
-rw-r--r--regparse.c6
-rw-r--r--regparse.h4
-rw-r--r--version.h6
8 files changed, 34 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index 7b52714..71ecc46 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+Mon Feb 13 00:01:32 2006 K.Kosako <sndgk393 AT ybb.ne.jp>
+
+ * oniguruma.h: Version 4.0.1
+
+ * regparse.c (onig_free_shared_cclass_table): fix memory leaks.
+
+ * regcomp.c (optimize_node_left): change from IS_POSIXLINE() to IS_MULTILINE().
+
+ * regint.h: rename ANCHOR_ANYCHAR_STAR_PL to ANCHOR_ANYCHAR_STAR_ML.
+
+ * regparse.h: ditto.
+
+ * regexec.c: ditto.
+
Sat Feb 11 21:57:29 2006 Masaki Suketa <masaki.suketa@nifty.ne.jp>
* ext/win32ole/win32ole.c: add WIN32OLE.create_guid.
diff --git a/oniguruma.h b/oniguruma.h
index 0fd7e12..62f899d 100644
--- a/oniguruma.h
+++ b/oniguruma.h
@@ -36,7 +36,7 @@ extern "C" {
#define ONIGURUMA
#define ONIGURUMA_VERSION_MAJOR 4
#define ONIGURUMA_VERSION_MINOR 0
-#define ONIGURUMA_VERSION_TEENY 0
+#define ONIGURUMA_VERSION_TEENY 1
#ifdef __cplusplus
# ifndef HAVE_PROTOTYPES
diff --git a/regcomp.c b/regcomp.c
index ff0fd8a..f604383 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -2,7 +2,7 @@
regcomp.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2005 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2006 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -4169,8 +4169,8 @@ optimize_node_left(Node* node, NodeOptInfo* opt, OptEnv* env)
if (qn->lower == 0 && IS_REPEAT_INFINITE(qn->upper)) {
if (env->mmd.max == 0 &&
NTYPE(qn->target) == N_ANYCHAR && qn->greedy) {
- if (IS_POSIXLINE(env->options))
- add_opt_anc_info(&opt->anc, ANCHOR_ANYCHAR_STAR_PL);
+ if (IS_MULTILINE(env->options))
+ add_opt_anc_info(&opt->anc, ANCHOR_ANYCHAR_STAR_ML);
else
add_opt_anc_info(&opt->anc, ANCHOR_ANYCHAR_STAR);
}
@@ -4360,7 +4360,7 @@ set_optimize_info_from_tree(Node* node, regex_t* reg, ScanEnv* scan_env)
if (r) return r;
reg->anchor = opt.anc.left_anchor & (ANCHOR_BEGIN_BUF |
- ANCHOR_BEGIN_POSITION | ANCHOR_ANYCHAR_STAR | ANCHOR_ANYCHAR_STAR_PL);
+ ANCHOR_BEGIN_POSITION | ANCHOR_ANYCHAR_STAR | ANCHOR_ANYCHAR_STAR_ML);
reg->anchor |= opt.anc.right_anchor & (ANCHOR_END_BUF | ANCHOR_SEMI_END_BUF);
@@ -4472,7 +4472,7 @@ print_anchor(FILE* f, int anchor)
q = 1;
fprintf(f, "anychar-star");
}
- if (anchor & ANCHOR_ANYCHAR_STAR_PL) {
+ if (anchor & ANCHOR_ANYCHAR_STAR_ML) {
if (q) fprintf(f, ", ");
fprintf(f, "anychar-star-pl");
}
diff --git a/regexec.c b/regexec.c
index fd92904..2aeaf14 100644
--- a/regexec.c
+++ b/regexec.c
@@ -2,7 +2,7 @@
regexec.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2005 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2006 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -3351,7 +3351,7 @@ onig_search(regex_t* reg, const UChar* str, const UChar* end,
goto end_buf;
}
}
- else if ((reg->anchor & ANCHOR_ANYCHAR_STAR_PL)) {
+ else if ((reg->anchor & ANCHOR_ANYCHAR_STAR_ML)) {
goto begin_position;
}
}
diff --git a/regint.h b/regint.h
index bf7da0a..9affd70 100644
--- a/regint.h
+++ b/regint.h
@@ -4,7 +4,7 @@
regint.h - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2005 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2006 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -523,7 +523,7 @@ typedef struct _BBuf {
#define ANCHOR_LOOK_BEHIND_NOT (1<<13)
#define ANCHOR_ANYCHAR_STAR (1<<14) /* ".*" optimize info */
-#define ANCHOR_ANYCHAR_STAR_PL (1<<15) /* ".*" optimize info (posix-line) */
+#define ANCHOR_ANYCHAR_STAR_ML (1<<15) /* ".*" optimize info (multi-line) */
/* operation code */
enum OpCode {
diff --git a/regparse.c b/regparse.c
index 76bce78..6cc2082 100644
--- a/regparse.c
+++ b/regparse.c
@@ -2,7 +2,7 @@
regparse.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2005 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2006 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -4675,6 +4675,8 @@ i_free_shared_class(type_cclass_key* key, Node* node, void* arg)
if (IS_NOT_NULL(cc->mbuf)) xfree(cc->mbuf);
xfree(node);
}
+
+ if (IS_NOT_NULL(key)) xfree(key);
return ST_DELETE;
}
@@ -4683,6 +4685,8 @@ onig_free_shared_cclass_table()
{
if (IS_NOT_NULL(OnigTypeCClassTable)) {
onig_st_foreach(OnigTypeCClassTable, i_free_shared_class, 0);
+ xfree(OnigTypeCClassTable);
+ OnigTypeCClassTable = NULL;
}
return 0;
diff --git a/regparse.h b/regparse.h
index bdf6d92..13f80b0 100644
--- a/regparse.h
+++ b/regparse.h
@@ -4,7 +4,7 @@
regparse.h - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2005 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2006 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -67,7 +67,7 @@
#define CTYPE_XDIGIT (1<<6)
#define CTYPE_NOT_XDIGIT (1<<7)
-#define ANCHOR_ANYCHAR_STAR_MASK (ANCHOR_ANYCHAR_STAR | ANCHOR_ANYCHAR_STAR_PL)
+#define ANCHOR_ANYCHAR_STAR_MASK (ANCHOR_ANYCHAR_STAR | ANCHOR_ANYCHAR_STAR_ML)
#define ANCHOR_END_BUF_MASK (ANCHOR_END_BUF | ANCHOR_SEMI_END_BUF)
#define EFFECT_MEMORY (1<<0)
diff --git a/version.h b/version.h
index 554d0da..56fa318 100644
--- a/version.h
+++ b/version.h
@@ -1,14 +1,14 @@
#define RUBY_VERSION "1.9.0"
-#define RUBY_RELEASE_DATE "2006-02-11"
+#define RUBY_RELEASE_DATE "2006-02-13"
#define RUBY_VERSION_CODE 190
-#define RUBY_RELEASE_CODE 20060211
+#define RUBY_RELEASE_CODE 20060213
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 9
#define RUBY_VERSION_TEENY 0
#define RUBY_RELEASE_YEAR 2006
#define RUBY_RELEASE_MONTH 2
-#define RUBY_RELEASE_DAY 11
+#define RUBY_RELEASE_DAY 13
RUBY_EXTERN const char ruby_version[];
RUBY_EXTERN const char ruby_release_date[];