зеркало из https://github.com/github/ruby.git
* regparse.c: now handles many alternatives (over 500000) in regexp. [ruby-dev:24773]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
af7418e5c4
Коммит
cb32ebe81c
|
@ -1,3 +1,8 @@
|
|||
Tue Nov 30 00:12:57 2004 Kazuo Saito <ksaito@uranus.dti.ne.jp>
|
||||
|
||||
* regparse.c: now handles many alternatives (over 500000)
|
||||
in regexp. [ruby-dev:24773]
|
||||
|
||||
Mon Nov 29 16:06:04 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/stringio/stringio.c (strio_write): insufficiently filled string
|
||||
|
|
23
regparse.c
23
regparse.c
|
@ -866,6 +866,7 @@ static FreeNode* FreeNodeList = (FreeNode* )NULL;
|
|||
extern void
|
||||
onig_node_free(Node* node)
|
||||
{
|
||||
start:
|
||||
if (IS_NULL(node)) return ;
|
||||
|
||||
switch (NTYPE(node)) {
|
||||
|
@ -878,7 +879,23 @@ onig_node_free(Node* node)
|
|||
case N_LIST:
|
||||
case N_ALT:
|
||||
onig_node_free(NCONS(node).left);
|
||||
onig_node_free(NCONS(node).right);
|
||||
/* onig_node_free(NCONS(node).right); */
|
||||
{
|
||||
Node* next_node = NCONS(node).right;
|
||||
|
||||
#ifdef USE_RECYCLE_NODE
|
||||
{
|
||||
FreeNode* n = (FreeNode* )node;
|
||||
n->next = FreeNodeList;
|
||||
FreeNodeList = n;
|
||||
}
|
||||
#else
|
||||
xfree(node);
|
||||
#endif
|
||||
|
||||
node = next_node;
|
||||
goto start;
|
||||
}
|
||||
break;
|
||||
|
||||
case N_CCLASS:
|
||||
|
@ -909,9 +926,7 @@ onig_node_free(Node* node)
|
|||
|
||||
#ifdef USE_RECYCLE_NODE
|
||||
{
|
||||
FreeNode* n;
|
||||
|
||||
n = (FreeNode* )node;
|
||||
FreeNode* n = (FreeNode* )node;
|
||||
n->next = FreeNodeList;
|
||||
FreeNodeList = n;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче