#6391: libGAP! -- create a Cython library interface to gap
---------------------------+------------------------------------------------
Reporter: was | Owner: was
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-4.7
Component: interfaces | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
---------------------------+------------------------------------------------
Comment(by vbraun):
Updated version (both spkg and library patch) fixes this issue:
{{{
sage: import sage.libs.gap.gap as g
sage: g.libgap('0')
0
sage: g.libgap('if 4>3 then\nPrint("hi");\nfi')
NULL
sage: g.libgap('if 4>3 thenPrint("hi");\nfi')
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (1312, 0))
---------------------------------------------------------------------------
ValueError Traceback (most recent call
last)
/home/vbraun/opt/sage-4.7.alpha1/devel/sage-main/sage/libs/gap/<ipython
console> in <module>()
/home/vbraun/Sage/sage/local/lib/python2.6/site-
packages/sage/structure/parent.so in sage.structure.parent.Parent.__call__
(sage/structure/parent.c:6816)()
/home/vbraun/Sage/sage/local/lib/python2.6/site-
packages/sage/structure/coerce_maps.so in
sage.structure.coerce_maps.DefaultConvertMap_unique._call_
(sage/structure/coerce_maps.c:3254)()
/home/vbraun/Sage/sage/local/lib/python2.6/site-
packages/sage/structure/coerce_maps.so in
sage.structure.coerce_maps.DefaultConvertMap_unique._call_
(sage/structure/coerce_maps.c:3157)()
/home/vbraun/Sage/sage/local/lib/python2.6/site-
packages/sage/libs/gap/gap.so in
sage.libs.gap.gap.Gap._element_constructor_ (sage/libs/gap/gap.c:6995)()
1125 if not isinstance(x, str):
1126 x = x._gap_init_()
-> 1127 return make_GapElement(self, libgap_eval(x))
1128
1129
/home/vbraun/Sage/sage/local/lib/python2.6/site-
packages/sage/libs/gap/gap.so in sage.libs.gap.gap.libgap_eval
(sage/libs/gap/gap.c:3034)()
424 if status != STATUS_END:
425 ClearError()
--> 426 raise ValueError, 'Not a normal statement.'
427 return NULL
428
ValueError: Not a normal statement.
sage: g.libgap('0')
0
}}}
Also, I changed the libGAP memory allocation to not use `sbrk()`, now it
runs under valgrind ;-)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6391#comment:42>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.