Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
0c4ad4e1
Commit
0c4ad4e1
authored
Apr 03, 1997
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug in reinitialization code.
parent
e1c2c430
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
14 deletions
+32
-14
lib/python/SearchIndex/Trie.c
lib/python/SearchIndex/Trie.c
+32
-14
No files found.
lib/python/SearchIndex/Trie.c
View file @
0c4ad4e1
...
...
@@ -53,7 +53,7 @@
static
char
Trie_module_documentation
[]
=
""
"
\n
$Id: Trie.c,v 1.
5 1997/03/20 19:30:04
jim Exp $"
"
\n
$Id: Trie.c,v 1.
6 1997/04/03 15:53:48
jim Exp $"
;
...
...
@@ -143,21 +143,36 @@ Trie__p___reinit__(TrieObject *self, PyObject *args)
{
PyObject
*
oid
,
*
jar
,
*
copy
;
UNLESS
(
PyArg_ParseTuple
(
args
,
"OOO"
,
&
oid
,
&
jar
,
&
copy
))
return
NULL
;
UNLESS
(
self
->
oid
)
if
(
PyArg_ParseTuple
(
args
,
""
))
{
Py_INCREF
(
oid
);
ASSIGN
(
self
->
oid
,
oid
);
if
(
self
->
state
==
cPersistent_UPTODATE_STATE
)
{
Py_XDECREF
(
self
->
bins
);
Py_XDECREF
(
self
->
value
);
self
->
bins
=
NULL
;
self
->
value
=
NULL
;
self
->
min
=
0
;
self
->
state
=
cPersistent_GHOST_STATE
;
}
}
if
((
self
->
oid
==
oid
||
PyObject_Compare
(
self
->
oid
,
oid
)
==
0
)
&&
self
->
state
==
cPersistent_UPTODATE_STATE
)
else
{
Py_XDECREF
(
self
->
bins
);
Py_XDECREF
(
self
->
value
);
self
->
bins
=
NULL
;
self
->
value
=
NULL
;
self
->
min
=
0
;
self
->
state
=
cPersistent_GHOST_STATE
;
UNLESS
(
PyArg_ParseTuple
(
args
,
"OOO"
,
&
oid
,
&
jar
,
&
copy
))
return
NULL
;
UNLESS
(
self
->
oid
)
{
Py_INCREF
(
oid
);
ASSIGN
(
self
->
oid
,
oid
);
}
if
((
self
->
oid
==
oid
||
PyObject_Compare
(
self
->
oid
,
oid
)
==
0
)
&&
self
->
state
==
cPersistent_UPTODATE_STATE
)
{
Py_XDECREF
(
self
->
bins
);
Py_XDECREF
(
self
->
value
);
self
->
bins
=
NULL
;
self
->
value
=
NULL
;
self
->
min
=
0
;
self
->
state
=
cPersistent_GHOST_STATE
;
}
}
Py_INCREF
(
Py_None
);
return
Py_None
;
...
...
@@ -647,7 +662,7 @@ void
initTrie
()
{
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.
5
$"
;
char
*
rev
=
"$Revision: 1.
6
$"
;
UNLESS
(
ExtensionClassImported
)
return
;
...
...
@@ -687,6 +702,9 @@ initTrie()
Revision Log:
$Log: Trie.c,v $
Revision 1.6 1997/04/03 15:53:48 jim
Fixed bug in reinitialization code.
Revision 1.5 1997/03/20 19:30:04 jim
Major rewrite to use more efficient data structure. In particular,
try to avoid one-element tries by storing partial-key/value tuples
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment