|
From: SourceForge.net <no...@so...> - 2009-03-16 14:53:20
|
Bugs item #2688610, was opened at 2009-03-16 21:42 Message generated for change (Comment added) made by bhy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101645&aid=2688610&group_id=1645 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: python Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nigel (nigel_galloway) Assigned to: Nobody/Anonymous (nobody) Summary: Swig should not use cmpfunc in Python 3 Initial Comment: When I attempted to compile the wrapper generated by swig1.3.38 against Python3.0.1 it failed. I decided to modify object.h from C:\Python30\include: typedef PyObject *(*getattrofunc)(PyObject *, PyObject *); typedef int (*setattrfunc)(PyObject *, char *, PyObject *); typedef int (*setattrofunc)(PyObject *, PyObject *, PyObject *); typedef PyObject *(*reprfunc)(PyObject *); typedef PyObject *(*getattrofunc)(PyObject *, PyObject *); typedef int (*setattrfunc)(PyObject *, char *, PyObject *); typedef int (*cmpfunc)(PyObject *, PyObject *); typedef int (*setattrofunc)(PyObject *, PyObject *, PyObject *); typedef PyObject *(*reprfunc)(PyObject *); adding the typedef for cmpfunc. It then compiles fine, AND appears to work. C:\Users\Nigel\myPython\iajaar\Python>c:\Python30\python sample.iajaar.3.py * 0: obj = 0.000000000e+000 infeas = 0.000e+000 (0) * 2: obj = 7.333333333e+002 infeas = 0.000e+000 (0) OPTIMAL SOLUTION FOUND Z = 733.333333333 ; x1 = 33.3333333333 ; x2 = 66.6666666667 ; x3 = 0.0 Python insist that SWIG should not be using cmpfunc (see Python issue 5431). ---------------------------------------------------------------------- >Comment By: Haoyu Bai (bhy) Date: 2009-03-16 22:53 Message: This should be fixed in recent SVN trunk of SWIG. Could you check it? Thanks! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101645&aid=2688610&group_id=1645 |