[Python-checkins] r41967 - in python/branches/ssize_t: Modules/_elementtree.c Objects/structseq.c
neal.norwitz
python-checkins at python.org
Sun Jan 8 03:20:15 CET 2006
Author: neal.norwitz
Date: Sun Jan 8 03:20:14 2006
New Revision: 41967
Modified:
python/branches/ssize_t/Modules/_elementtree.c
python/branches/ssize_t/Objects/structseq.c
Log:
Use proper length function return type
Modified: python/branches/ssize_t/Modules/_elementtree.c
==============================================================================
--- python/branches/ssize_t/Modules/_elementtree.c (original)
+++ python/branches/ssize_t/Modules/_elementtree.c Sun Jan 8 03:20:14 2006
@@ -1024,7 +1024,7 @@
return PyDict_Keys(self->extra->attrib);
}
-static int
+static Py_ssize_t
element_length(ElementObject* self)
{
if (!self->extra)
@@ -1375,7 +1375,7 @@
}
static PySequenceMethods element_as_sequence = {
- (inquiry) element_length,
+ (lenfunc) element_length,
0, /* sq_concat */
0, /* sq_repeat */
element_getitem,
Modified: python/branches/ssize_t/Objects/structseq.c
==============================================================================
--- python/branches/ssize_t/Objects/structseq.c (original)
+++ python/branches/ssize_t/Objects/structseq.c Sun Jan 8 03:20:14 2006
@@ -49,7 +49,7 @@
PyObject_Del(obj);
}
-static int
+static Py_ssize_t
structseq_length(PyStructSequence *obj)
{
return VISIBLE_SIZE(obj);
@@ -284,7 +284,7 @@
}
static PySequenceMethods structseq_as_sequence = {
- (inquiry)structseq_length,
+ (lenfunc)structseq_length,
(binaryfunc)structseq_concat, /* sq_concat */
(ssizeargfunc)structseq_repeat, /* sq_repeat */
(ssizeargfunc)structseq_item, /* sq_item */
More information about the Python-checkins
mailing list