Re: [Python-Dev] New PEP: Using ssize_t as the index type
by Fredrik Lundh other posts by this author
Dec 29 2005 2:36PM messages near this date
Re: [Python-Dev] New PEP: Using ssize_t as the index type
|
Re: [Python-Dev] New PEP: Using ssize_t as the index type
Martin v. L�wis wrote:
> Please let me know what you think.
+1. in honor of the Bike Shed Effect, I'm going to assume that you've
thought of everything.
:::
well, one thing seems to missing from your PEP: in several modules, you've
changed the cast used in the type table. e.g.
--- python/branches/ssize_t/Modules/_elementtree.c (original)
+++ python/branches/ssize_t/Modules/_elementtree.c Tue Dec 20 09:52:16 2005
@@ -1228,7 +1228,7 @@
}
static int
-element_setitem(ElementObject* self, size_t index, PyObject* item)
+element_setitem(ElementObject* self, Py_ssize_t index, PyObject* item)
{
int i;
PyObject* old;
@@ -1373,7 +1373,7 @@
0, /* sq_repeat */
(ssizeargfunc) element_getitem,
(ssizessizeargfunc) element_getslice,
- (sizeobjargproc) element_setitem,
+ (ssizeobjargproc) element_setitem,
(ssizessizeobjargproc) element_setslice,
};
is this change backwards compatible ?
</F>
Attachments:
unknown1
unknown2
Thread:
"Martin v. Löwis"
Travis E. Oliphant
"Martin v. Löwis"
Brett Cannon
Fredrik Lundh
"Martin v. Löwis"
Tim Peters
"Martin v. Löwis"
Armin Rigo
"Martin v. Löwis"
Armin Rigo
"Martin v. Löwis"
M.-A. Lemburg
Neal Norwitz
"Martin v. Löwis"
M.-A. Lemburg
"Martin v. Löwis"
M.-A. Lemburg
"Martin v. Löwis"
M.-A. Lemburg
"Martin v. Löwis"
Tim Peters
"Martin v. Löwis"
Michael Urman
Neal Norwitz
Aahz
"Martin v. Löwis"
Guido van Rossum
|