Commit d92143b2 authored by Tres Seaver's avatar Tres Seaver

Py3k doesn't allow bare METH_KEYWORDS.

Instead, OR it with METH_VARARGS.
parent ab7e20c7
...@@ -2091,18 +2091,18 @@ static struct PyMethodDef BTree_methods[] = { ...@@ -2091,18 +2091,18 @@ static struct PyMethodDef BTree_methods[] = {
"has_key(key)\n\n" "has_key(key)\n\n"
"Return true if the BTree contains the given key."}, "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" "keys([min, max]) -> list of keys\n\n"
"Returns the keys of the BTree. If min and max are supplied, only\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."}, "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" "values([min, max]) -> list of values\n\n"
"Returns the values of the BTree. If min and max are supplied, only\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" "values corresponding to keys greater than min and less than max are\n"
"returned."}, "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" "items([min, max]) -> -- list of key, value pairs\n\n"
"Returns the items of the BTree. If min and max are supplied, only\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."}, "items with keys greater than min and less than max are returned."},
...@@ -2148,13 +2148,13 @@ static struct PyMethodDef BTree_methods[] = { ...@@ -2148,13 +2148,13 @@ static struct PyMethodDef BTree_methods[] = {
{"update", (PyCFunction) Mapping_update, METH_O, {"update", (PyCFunction) Mapping_update, METH_O,
"update(collection)\n\n Add the items from the given collection."}, "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"}, "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"}, "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) " "B.iteritems([min[,max]]) -> an iterator over the (key, value) "
"items of B"}, "items of B"},
...@@ -2166,7 +2166,8 @@ static struct PyMethodDef BTree_methods[] = { ...@@ -2166,7 +2166,8 @@ static struct PyMethodDef BTree_methods[] = {
(PyCFunction) BTree__p_resolveConflict, METH_VARARGS, (PyCFunction) BTree__p_resolveConflict, METH_VARARGS,
"_p_resolveConflict() -- Reinitialize from a newly created copy"}, "_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\nReinitialize from a newly created copy."}, "_p_deactivate()\n\nReinitialize from a newly created copy."},
#endif #endif
{NULL, NULL} {NULL, NULL}
......
...@@ -1610,7 +1610,7 @@ static struct PyMethodDef Bucket_methods[] = { ...@@ -1610,7 +1610,7 @@ static struct PyMethodDef Bucket_methods[] = {
{"__setstate__", (PyCFunction) bucket_setstate, METH_O, {"__setstate__", (PyCFunction) bucket_setstate, METH_O,
"__setstate__() -- Set the state of the object"}, "__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"}, "keys([min, max]) -- Return the keys"},
{"has_key", (PyCFunction) bucket_has_key, METH_O, {"has_key", (PyCFunction) bucket_has_key, METH_O,
...@@ -1630,10 +1630,10 @@ static struct PyMethodDef Bucket_methods[] = { ...@@ -1630,10 +1630,10 @@ static struct PyMethodDef Bucket_methods[] = {
"minKey([key]) -- Find the minimum key\n\n" "minKey([key]) -- Find the minimum key\n\n"
"If an argument is given, find the minimum >= the argument"}, "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"}, "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"}, "items([min, max])) -- Return the items"},
{"byValue", (PyCFunction) bucket_byValue, METH_O, {"byValue", (PyCFunction) bucket_byValue, METH_O,
...@@ -1654,13 +1654,14 @@ static struct PyMethodDef Bucket_methods[] = { ...@@ -1654,13 +1654,14 @@ static struct PyMethodDef Bucket_methods[] = {
"If key is not found, d is returned if given, otherwise KeyError\n" "If key is not found, d is returned if given, otherwise KeyError\n"
"is raised."}, "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"}, "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"}, "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) " "B.iteritems([min[,max]]) -> an iterator over the (key, value) "
"items of B"}, "items of B"},
...@@ -1673,7 +1674,8 @@ static struct PyMethodDef Bucket_methods[] = { ...@@ -1673,7 +1674,8 @@ static struct PyMethodDef Bucket_methods[] = {
(PyCFunction) bucket__p_resolveConflict, METH_VARARGS, (PyCFunction) bucket__p_resolveConflict, METH_VARARGS,
"_p_resolveConflict() -- Reinitialize from a newly created copy"}, "_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"}, "_p_deactivate() -- Reinitialize from a newly created copy"},
#endif #endif
{NULL, NULL} {NULL, NULL}
......
...@@ -182,7 +182,7 @@ static struct PyMethodDef Set_methods[] = { ...@@ -182,7 +182,7 @@ static struct PyMethodDef Set_methods[] = {
{"__setstate__", (PyCFunction) set_setstate, METH_VARARGS, {"__setstate__", (PyCFunction) set_setstate, METH_VARARGS,
"__setstate__() -- Set the state of the object"}, "__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"}, "keys() -- Return the keys"},
{"has_key", (PyCFunction) bucket_has_key, METH_O, {"has_key", (PyCFunction) bucket_has_key, METH_O,
...@@ -204,7 +204,8 @@ static struct PyMethodDef Set_methods[] = { ...@@ -204,7 +204,8 @@ static struct PyMethodDef Set_methods[] = {
(PyCFunction) bucket__p_resolveConflict, METH_VARARGS, (PyCFunction) bucket__p_resolveConflict, METH_VARARGS,
"_p_resolveConflict() -- Reinitialize from a newly created copy"}, "_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"}, "_p_deactivate() -- Reinitialize from a newly created copy"},
#endif #endif
......
...@@ -133,7 +133,7 @@ static struct PyMethodDef TreeSet_methods[] = ...@@ -133,7 +133,7 @@ static struct PyMethodDef TreeSet_methods[] =
"has_key(key)\n\n" "has_key(key)\n\n"
"Return true if the TreeSet contains the given key."}, "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" "keys([min, max]) -> list of keys\n\n"
"Returns the keys of the TreeSet. If min and max are supplied, only\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."}, "keys greater than min and less than max are returned."},
...@@ -171,7 +171,8 @@ static struct PyMethodDef TreeSet_methods[] = ...@@ -171,7 +171,8 @@ static struct PyMethodDef TreeSet_methods[] =
(PyCFunction) BTree__p_resolveConflict, METH_VARARGS, (PyCFunction) BTree__p_resolveConflict, METH_VARARGS,
"_p_resolveConflict() -- Reinitialize from a newly created copy"}, "_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\nReinitialize from a newly created copy."}, "_p_deactivate()\n\nReinitialize from a newly created copy."},
#endif #endif
{NULL, NULL} /* sentinel */ {NULL, NULL} /* sentinel */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment