msg67477 - (view) |
Author: Stefan Behnel (scoder) *  |
Date: 2008-05-29 07:55 |
Here is a patch that removes three unused fields from the PyNumberMethods struct in Py3. Since two fields were already removed (one even before the ones this patch removes), there is no way existing Py2 C code that uses this struct can work in Py3 without changes, so it doesn't add any problems. |
|
|
msg67593 - (view) |
Author: Stefan Behnel (scoder) *  |
Date: 2008-06-01 14:20 |
This seems to have been applied in current SVN. |
|
|
msg67630 - (view) |
Author: Georg Brandl (georg.brandl) *  |
Date: 2008-06-02 06:05 |
Not to me... |
|
|
msg67753 - (view) |
Author: Stefan Behnel (scoder) *  |
Date: 2008-06-06 07:59 |
:) sorry, that's the problem when you don't have commit rights and leave the changes in your local copy. So this is still an open issue that should be fixed before beta1, thanks. |
|
|
msg67761 - (view) |
Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) *  |
Date: 2008-06-06 11:45 |
Let me quote a comment from GvR about the similar : """ Can you redo the patch while keeping the slot *position* (though not the name or type)? The wasted space is minimal (4-8 bytes per type or class object) and it means a lot for third party code if the positional struct initialization never breaks due to insertion or removal of a slot. Since everyone has a zero here anyway, I propose to name the slot nb_reserved and make its type int. """ OTOH, it's python 3.0, and we are allowed to break things... |
|
|
msg67762 - (view) |
Author: Stefan Behnel (scoder) *  |
Date: 2008-06-06 11:52 |
I would accept that if this had been done in all cases, but as I wrote in my first comment, the previously existing slot "nb_divide", which comes *before* the named ones, has already been removed, so there is no way existing Py2 code can work unchanged in Py3, even if we leave the three fields in. |
|
|
msg67903 - (view) |
Author: Stefan Behnel (scoder) *  |
Date: 2008-06-10 13:05 |
The change that removed the nb_divide and nb_inplace_divide members is here: http://svn.python.org/view?rev=43285&view=rev http://svn.python.org/view/python/branches/p3yk/Include/object.h?rev=43285&view=diff&r1=43285&r2=43284 It dates back to March 2006. (changing issue type to "compile error" as that's what you currently get for Py2 code due to this change) |
|
|
msg68000 - (view) |
Author: Guido van Rossum (gvanrossum) *  |
Date: 2008-06-11 17:26 |
I say let's go with the cleanup. Extensions that want to be compiled under 2.x and 3.0 will need lots of #ifdef code anyway. |
|
|
msg68014 - (view) |
Author: Benjamin Peterson (benjamin.peterson) *  |
Date: 2008-06-11 20:22 |
Applied in r64149. |
|
|