Message166935
When Python is compiled by Visual Studio 10 in PGUpdate mode, duplicated functions are merged to become the same unique function. The C code of wrap_binaryfunc() and wrap_binaryfunc_l() functions is the same and so both functions get the same address.
For "class List(list): pass", type_new() fills type->tp_as_number->nb_add to list_concat() because "d->d_base->wrapper == p->wrapper" is True whereas it should be False (wrap_binaryfunc vs wrap_binaryfunc_l).
A workaround is to use a different code for wrap_binaryfunc() and wrap_binaryfunc_l(). A real fix is to use something else than the address of the wrapper to check the type of the operator (left, right, or the 3rd type). |
|
Date |
User |
Action |
Args |
2012-07-31 00:08:57 | vstinner | set | recipients:
+ vstinner, loewis, georg.brandl, rhettinger, terry.reedy, ishimoto, amaury.forgeotdarc, ncoghlan, pitrou, jackdied, tim.golden, eric.araujo, mrabarnett, alex, r.david.murray, brian.curtin, skrah, benrg |
2012-07-31 00:08:57 | vstinner | set | messageid: <1343693337.69.0.470463379137.issue8847@psf.upfronthosting.co.za> |
2012-07-31 00:08:57 | vstinner | link | issue8847 messages |
2012-07-31 00:08:56 | vstinner | create | |
|