#11868: PARI library interface broken by design
-----------------------------------+------------------------------
Reporter: jdemeyer | Owner: was
Type: defect | Status: needs_work
Priority: major | Milestone: sage-5.13
Component: interfaces | Resolution:
Keywords: t0GEN t1GEN gen | Merged in:
Authors: Peter Bruin | Reviewers: Jeroen Demeyer
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
-----------------------------------+------------------------------
Comment (by pbruin):
Replying to [comment:18 jdemeyer]:
> I found another problem with your patch: you must not do
> {{{
> pari_catch_sig_on()
> cdef GEN t0 = P.toGEN(x)
> }}}
> because you should not call Python code within `sig_on()`/`sig_off()`
and `toGEN()` potentially calls Python code. So the `toGEN` should be
before `pari_catch_sig_on()`.
Yes, I also realised in the meantime that this is a problem. With the
current policy of clearing the whole stack at every `new_gen()`, this
means that have to wrap every temporary `GEN` in a `gen` if we want it to
survive subsequent applications of `toGEN()`. So I think the best
solution is to use `gen` instead of `GEN`, as in comment:11. (This is
essentially very close to what we currently have.)
--
Ticket URL: <http://trac.sagemath.org/ticket/11868#comment:20>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.