On Thursday, September 7, 2017 at 7:01:47 AM UTC-7, Dima Pasechnik wrote:
>
> Hi Simon,
>
> I don't think anything special like libgap_enter/exit  is needed when 
> calling libgap.* stuff from
> Python or Cython.
> We do quite a few libgap calls in graphs/strongly_regular_db.pyx
> and in graphs/generators/classical_geometries.py
> so this all seems to work just fine.
>
> Do you mean something else?
> Dima
>

Reading the documentation of sage.lib.gap.libgap, it seems that one of the 
functions of libgap_enter is to mark which part of the C stack should be 
searched for pointers to objects that should be considered live by the gap 
garbage collector. So it would seem to be that as long as you make sure 
that all your libgap objects have a pointer to them in the libgap heap you 
might be fine, but otherwise you might end up with unpredictable failures 
(when an object only kept alive by being referenced by a local variable 
undergoes garbage collection). So I wouldn't be too encouraged by the 
observation that all seems to work just fine.

-- 
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