On 08/09/2017 08:55, Simon King wrote:
On 2017-09-08, Simon King <simon.k...@uni-jena.de> wrote:
When I do libgap_enter() and then
    cdef GapElement_FiniteField zero = libgap(F.zero())
(where F=GF(2)), I get a crash. I am about to test whether I can make
up a minimal example from it.

VoilĂ  :

sage: cython("""
....: #!clib gap
....: from sage.libs.gap.gap_includes cimport *
....: from sage.libs.gap.element cimport GapElement_FiniteField
....: from sage.libs.gap.libgap import libgap
....: def test(x):
....:     libgap_enter()
....:     cdef GapElement_FiniteField y = libgap(x)
....:     libgap_exit()
....: """)
sage: test(GF(2).zero())

The above crashes. When I move libgap_enter() one line down, it works.
Reason?

In the above code you are *not* calling the C API. Just avoid the libgap_enter / libgap_exit.

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to