On Jan 20, 8:45 pm, Jeroen Demeyer <jdeme...@cage.ugent.be> wrote: > On 2011-01-20 10:37, Dima Pasechnik wrote: > > > Hoi Jeroen, > > do you have an example with the new syntax of the situation that I > > describe?
something like: cdef class GapElement(RingElement): .... # include setjmp C header .... cdef static jmp_buf buf cpdef RingElement _div_(self, RingElement right): if not setjmp(buf): # return make_GapElement(QUO(self.value, (<GapElement>right).value)) else: raise #????? Here QUO is a call to division done by the GAP interpreter wrapped into a dynamic library. In the latter I'd put the appropriate longjmp call, to deal with the case of an error (e.g. zero division). > > It is not really clear to me what you want to do. But I certainly want > to help doing whatever it is you want to do. see above. Does it look right? Does it need sig_on(), etc? -- 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