#303 Patch for bug 3441262

open
nobody
None
5
2012-12-21
2012-03-26
No

This patch fixes the bug 3441262, it modifies the pyopers.swg and python_richcompare test unit. It makes swig's generated __eq__ operator return false when it's supplied with invalid arg. And it also makes __ne__ behave similary.

Discussion

  • Dmitry Kabak

    Dmitry Kabak - 2012-03-26

    fix for python's eq and ne operators

     
  • Vadim Zeitlin

    Vadim Zeitlin - 2012-03-27

    I don't know enough about Python wrappers to be sure that this is the best way to do it (notably what about SWIGPYTHON_BUILTIN case?), but this looks reasonable to me and should IMHO be applied.

     
  • Dmitry Kabak

    Dmitry Kabak - 2012-03-27

    Oops, sorry, I havent read the python's builtin feature documentation carefully enough, that won't work!) I'll fix it in some time...

     
  • Dmitry Kabak

    Dmitry Kabak - 2012-04-04

    Hm, that seems to work already for built-in case, because it handles comparing differently. This bug doesnt appear in trunk, the only case when it doesn't work is non-builtin, which is fixed by this patch.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks