> However, trying to wrap also numer_denom I'm stuck with a Cython/C++ problem: > > In GiNaC.pxi I defined: > > - ctypedef struct GExPair "std::pair<ex, ex>" > + ctypedef struct GExPair "std::pair<ex, ex>": > + pass > > and > > + GExPair numer_denom() except + > int degree(GEx expr) except + > > Now from expression.pyx, I want to write > > cdef GExPair pair = self._gobj.numer_denom() > > And GCC complains with > > sage/symbolic/expression.cpp: In function ‘PyObject* > __pyx_pf_4sage_8symbolic_10expression_10Expression_143numerator_denominator(PyObject*, > PyObject*, PyObject*)’: > sage/symbolic/expression.cpp:24931:114: error: no match for ‘operator=’ in > ‘__pyx_t_1 = GiNaC::ex::numer_denom() const()’ > /usr/include/c++/4.5/bits/stl_pair.h:72:5: note: candidate is: > std::pair<GiNaC::ex, GiNaC::ex>& std::pair<GiNaC::ex, > GiNaC::ex>::operator=(const std::pair<GiNaC::ex, GiNaC::ex>&) > error: command 'gcc' failed with exit status 1
Forget about this ! Sorry for the noise. Florent -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org