Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
BTrees
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
BTrees
Commits
d92143b2
Commit
d92143b2
authored
Dec 14, 2012
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Py3k doesn't allow bare METH_KEYWORDS.
Instead, OR it with METH_VARARGS.
parent
ab7e20c7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
18 deletions
+23
-18
BTrees/BTreeTemplate.c
BTrees/BTreeTemplate.c
+8
-7
BTrees/BucketTemplate.c
BTrees/BucketTemplate.c
+9
-7
BTrees/SetTemplate.c
BTrees/SetTemplate.c
+3
-2
BTrees/TreeSetTemplate.c
BTrees/TreeSetTemplate.c
+3
-2
No files found.
BTrees/BTreeTemplate.c
View file @
d92143b2
...
...
@@ -2091,18 +2091,18 @@ static struct PyMethodDef BTree_methods[] = {
"has_key(key)
\n\n
"
"Return true if the BTree contains the given key."
},
{
"keys"
,
(
PyCFunction
)
BTree_keys
,
METH_KEYWORDS
,
{
"keys"
,
(
PyCFunction
)
BTree_keys
,
METH_
VARARGS
|
METH_
KEYWORDS
,
"keys([min, max]) -> list of keys
\n\n
"
"Returns the keys of the BTree. If min and max are supplied, only
\n
"
"keys greater than min and less than max are returned."
},
{
"values"
,
(
PyCFunction
)
BTree_values
,
METH_KEYWORDS
,
{
"values"
,
(
PyCFunction
)
BTree_values
,
METH_
VARARGS
|
METH_
KEYWORDS
,
"values([min, max]) -> list of values
\n\n
"
"Returns the values of the BTree. If min and max are supplied, only
\n
"
"values corresponding to keys greater than min and less than max are
\n
"
"returned."
},
{
"items"
,
(
PyCFunction
)
BTree_items
,
METH_KEYWORDS
,
{
"items"
,
(
PyCFunction
)
BTree_items
,
METH_
VARARGS
|
METH_
KEYWORDS
,
"items([min, max]) -> -- list of key, value pairs
\n\n
"
"Returns the items of the BTree. If min and max are supplied, only
\n
"
"items with keys greater than min and less than max are returned."
},
...
...
@@ -2148,13 +2148,13 @@ static struct PyMethodDef BTree_methods[] = {
{
"update"
,
(
PyCFunction
)
Mapping_update
,
METH_O
,
"update(collection)
\n\n
Add the items from the given collection."
},
{
"iterkeys"
,
(
PyCFunction
)
BTree_iterkeys
,
METH_KEYWORDS
,
{
"iterkeys"
,
(
PyCFunction
)
BTree_iterkeys
,
METH_
VARARGS
|
METH_
KEYWORDS
,
"B.iterkeys([min[,max]]) -> an iterator over the keys of B"
},
{
"itervalues"
,
(
PyCFunction
)
BTree_itervalues
,
METH_KEYWORDS
,
{
"itervalues"
,
(
PyCFunction
)
BTree_itervalues
,
METH_
VARARGS
|
METH_
KEYWORDS
,
"B.itervalues([min[,max]]) -> an iterator over the values of B"
},
{
"iteritems"
,
(
PyCFunction
)
BTree_iteritems
,
METH_KEYWORDS
,
{
"iteritems"
,
(
PyCFunction
)
BTree_iteritems
,
METH_
VARARGS
|
METH_
KEYWORDS
,
"B.iteritems([min[,max]]) -> an iterator over the (key, value) "
"items of B"
},
...
...
@@ -2166,7 +2166,8 @@ static struct PyMethodDef BTree_methods[] = {
(
PyCFunction
)
BTree__p_resolveConflict
,
METH_VARARGS
,
"_p_resolveConflict() -- Reinitialize from a newly created copy"
},
{
"_p_deactivate"
,
(
PyCFunction
)
BTree__p_deactivate
,
METH_KEYWORDS
,
{
"_p_deactivate"
,
(
PyCFunction
)
BTree__p_deactivate
,
METH_VARARGS
|
METH_KEYWORDS
,
"_p_deactivate()
\n\n
Reinitialize from a newly created copy."
},
#endif
{
NULL
,
NULL
}
...
...
BTrees/BucketTemplate.c
View file @
d92143b2
...
...
@@ -1610,7 +1610,7 @@ static struct PyMethodDef Bucket_methods[] = {
{
"__setstate__"
,
(
PyCFunction
)
bucket_setstate
,
METH_O
,
"__setstate__() -- Set the state of the object"
},
{
"keys"
,
(
PyCFunction
)
bucket_keys
,
METH_KEYWORDS
,
{
"keys"
,
(
PyCFunction
)
bucket_keys
,
METH_
VARARGS
|
METH_
KEYWORDS
,
"keys([min, max]) -- Return the keys"
},
{
"has_key"
,
(
PyCFunction
)
bucket_has_key
,
METH_O
,
...
...
@@ -1630,10 +1630,10 @@ static struct PyMethodDef Bucket_methods[] = {
"minKey([key]) -- Find the minimum key
\n\n
"
"If an argument is given, find the minimum >= the argument"
},
{
"values"
,
(
PyCFunction
)
bucket_values
,
METH_KEYWORDS
,
{
"values"
,
(
PyCFunction
)
bucket_values
,
METH_
VARARGS
|
METH_
KEYWORDS
,
"values([min, max]) -- Return the values"
},
{
"items"
,
(
PyCFunction
)
bucket_items
,
METH_KEYWORDS
,
{
"items"
,
(
PyCFunction
)
bucket_items
,
METH_
VARARGS
|
METH_
KEYWORDS
,
"items([min, max])) -- Return the items"
},
{
"byValue"
,
(
PyCFunction
)
bucket_byValue
,
METH_O
,
...
...
@@ -1654,13 +1654,14 @@ static struct PyMethodDef Bucket_methods[] = {
"If key is not found, d is returned if given, otherwise KeyError
\n
"
"is raised."
},
{
"iterkeys"
,
(
PyCFunction
)
Bucket_iterkeys
,
METH_KEYWORDS
,
{
"iterkeys"
,
(
PyCFunction
)
Bucket_iterkeys
,
METH_
VARARGS
|
METH_
KEYWORDS
,
"B.iterkeys([min[,max]]) -> an iterator over the keys of B"
},
{
"itervalues"
,
(
PyCFunction
)
Bucket_itervalues
,
METH_KEYWORDS
,
{
"itervalues"
,
(
PyCFunction
)
Bucket_itervalues
,
METH_VARARGS
|
METH_KEYWORDS
,
"B.itervalues([min[,max]]) -> an iterator over the values of B"
},
{
"iteritems"
,
(
PyCFunction
)
Bucket_iteritems
,
METH_KEYWORDS
,
{
"iteritems"
,
(
PyCFunction
)
Bucket_iteritems
,
METH_
VARARGS
|
METH_
KEYWORDS
,
"B.iteritems([min[,max]]) -> an iterator over the (key, value) "
"items of B"
},
...
...
@@ -1673,7 +1674,8 @@ static struct PyMethodDef Bucket_methods[] = {
(
PyCFunction
)
bucket__p_resolveConflict
,
METH_VARARGS
,
"_p_resolveConflict() -- Reinitialize from a newly created copy"
},
{
"_p_deactivate"
,
(
PyCFunction
)
bucket__p_deactivate
,
METH_KEYWORDS
,
{
"_p_deactivate"
,
(
PyCFunction
)
bucket__p_deactivate
,
METH_VARARGS
|
METH_KEYWORDS
,
"_p_deactivate() -- Reinitialize from a newly created copy"
},
#endif
{
NULL
,
NULL
}
...
...
BTrees/SetTemplate.c
View file @
d92143b2
...
...
@@ -182,7 +182,7 @@ static struct PyMethodDef Set_methods[] = {
{
"__setstate__"
,
(
PyCFunction
)
set_setstate
,
METH_VARARGS
,
"__setstate__() -- Set the state of the object"
},
{
"keys"
,
(
PyCFunction
)
bucket_keys
,
METH_KEYWORDS
,
{
"keys"
,
(
PyCFunction
)
bucket_keys
,
METH_
VARARGS
|
METH_
KEYWORDS
,
"keys() -- Return the keys"
},
{
"has_key"
,
(
PyCFunction
)
bucket_has_key
,
METH_O
,
...
...
@@ -204,7 +204,8 @@ static struct PyMethodDef Set_methods[] = {
(
PyCFunction
)
bucket__p_resolveConflict
,
METH_VARARGS
,
"_p_resolveConflict() -- Reinitialize from a newly created copy"
},
{
"_p_deactivate"
,
(
PyCFunction
)
bucket__p_deactivate
,
METH_KEYWORDS
,
{
"_p_deactivate"
,
(
PyCFunction
)
bucket__p_deactivate
,
METH_VARARGS
|
METH_KEYWORDS
,
"_p_deactivate() -- Reinitialize from a newly created copy"
},
#endif
...
...
BTrees/TreeSetTemplate.c
View file @
d92143b2
...
...
@@ -133,7 +133,7 @@ static struct PyMethodDef TreeSet_methods[] =
"has_key(key)
\n\n
"
"Return true if the TreeSet contains the given key."
},
{
"keys"
,
(
PyCFunction
)
BTree_keys
,
METH_KEYWORDS
,
{
"keys"
,
(
PyCFunction
)
BTree_keys
,
METH_
VARARGS
|
METH_
KEYWORDS
,
"keys([min, max]) -> list of keys
\n\n
"
"Returns the keys of the TreeSet. If min and max are supplied, only
\n
"
"keys greater than min and less than max are returned."
},
...
...
@@ -171,7 +171,8 @@ static struct PyMethodDef TreeSet_methods[] =
(
PyCFunction
)
BTree__p_resolveConflict
,
METH_VARARGS
,
"_p_resolveConflict() -- Reinitialize from a newly created copy"
},
{
"_p_deactivate"
,
(
PyCFunction
)
BTree__p_deactivate
,
METH_KEYWORDS
,
{
"_p_deactivate"
,
(
PyCFunction
)
BTree__p_deactivate
,
METH_VARARGS
|
METH_KEYWORDS
,
"_p_deactivate()
\n\n
Reinitialize from a newly created copy."
},
#endif
{
NULL
,
NULL
}
/* sentinel */
...
...
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