FS#23202 - [swig] can't compile generated python2 extensions with g++

Attached to Project: Arch Linux
Opened by Gregor (gregorburger) - Wednesday, 09 March 2011, 10:50 GMT
Last edited by Stéphane Gaudreault (stephane) - Thursday, 17 March 2011, 01:19 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Stéphane Gaudreault (stephane)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:

the python 3.2 slice patch breaks c++ compile for 2.7 extensions.

Additional info:
* package version(s)
2.0.2
* config and/or log files etc.

break_wrap.cxx: In function ‘std::vector<int, std::allocator<int> >* std_vector_Sl_int_Sg____getitem____SWIG_0(std::vector<int, std::allocator<int> >*, PyObject*)’:
break_wrap.cxx:4283:60: error: cannot convert ‘PyObject*’ to ‘PySliceObject*’ for argument ‘1’ to ‘int PySlice_GetIndices(PySliceObject*, Py_ssize_t, Py_ssize_t*, Py_ssize_t*, Py_ssize_t*)’
break_wrap.cxx: In function ‘void std_vector_Sl_int_Sg____setitem____SWIG_0(std::vector<int, std::allocator<int> >*, PyObject*, const std::vector<int, std::allocator<int> >&)’:
break_wrap.cxx:4292:60: error: cannot convert ‘PyObject*’ to ‘PySliceObject*’ for argument ‘1’ to ‘int PySlice_GetIndices(PySliceObject*, Py_ssize_t, Py_ssize_t*, Py_ssize_t*, Py_ssize_t*)’
break_wrap.cxx: In function ‘void std_vector_Sl_int_Sg____delitem____SWIG_1(std::vector<int, std::allocator<int> >*, PyObject*)’:
break_wrap.cxx:4301:60: error: cannot convert ‘PyObject*’ to ‘PySliceObject*’ for argument ‘1’ to ‘int PySlice_GetIndices(PySliceObject*, Py_ssize_t, Py_ssize_t*, Py_ssize_t*, Py_ssize_t*)’
break_wrap.cxx: In function ‘std::vector<double, std::allocator<double> >* std_vector_Sl_double_Sg____getitem____SWIG_0(std::vector<double, std::allocator<double> >*, PyObject*)’:
break_wrap.cxx:4383:60: error: cannot convert ‘PyObject*’ to ‘PySliceObject*’ for argument ‘1’ to ‘int PySlice_GetIndices(PySliceObject*, Py_ssize_t, Py_ssize_t*, Py_ssize_t*, Py_ssize_t*)’
break_wrap.cxx: In function ‘void std_vector_Sl_double_Sg____setitem____SWIG_0(std::vector<double, std::allocator<double> >*, PyObject*, const std::vector<double, std::allocator<double> >&)’:
break_wrap.cxx:4392:60: error: cannot convert ‘PyObject*’ to ‘PySliceObject*’ for argument ‘1’ to ‘int PySlice_GetIndices(PySliceObject*, Py_ssize_t, Py_ssize_t*, Py_ssize_t*, Py_ssize_t*)’
break_wrap.cxx: In function ‘void std_vector_Sl_double_Sg____delitem____SWIG_1(std::vector<double, std::allocator<double> >*, PyObject*)’:
break_wrap.cxx:4401:60: error: cannot convert ‘PyObject*’ to ‘PySliceObject*’ for argument ‘1’ to ‘int PySlice_GetIndices(PySliceObject*, Py_ssize_t, Py_ssize_t*, Py_ssize_t*, Py_ssize_t*)’



Steps to reproduce:
swig -python -c++ break.i
g++ -fPIC -shared -o break.so break_wrap.cxx -I /usr/include/python2.7/ -lpython2.7

   break.i (0.1 KiB)
This task depends upon

Closed by  Stéphane Gaudreault (stephane)
Thursday, 17 March 2011, 01:19 GMT
Reason for closing:  Fixed
Additional comments about closing:  swig-2.0.2-4 in [testing]

Loading...