Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Jul 25, 2023
1 parent 910c928 commit da2e9e6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/sage/libs/gap/element.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@ cdef Obj make_gap_list(sage_list) except NULL:
The list of the elements in ``a`` as a Gap ``Obj``.
"""
cdef Obj l = GAP_NewPlist(0)
cdef GapElement l = libgap(GAP_NewPlist(0))
cdef GapElement elem
for x in sage_list:
if not isinstance(x, GapElement):
elem = <GapElement>libgap(x)
else:
elem = <GapElement>x

AddList(l, elem.value)
return l
AddList(l.value, elem.value)
return l.value


cdef Obj make_gap_matrix(sage_list, gap_ring) except NULL:
Expand All @@ -77,7 +77,7 @@ cdef Obj make_gap_matrix(sage_list, gap_ring) except NULL:
The list of the elements in ``sage_list`` as a Gap ``Obj``.
"""
cdef Obj l = GAP_NewPlist(0)
cdef GapElement l = libgap(GAP_NewPlist(0))
cdef GapElement elem
cdef GapElement one
if gap_ring is not None:
Expand All @@ -91,8 +91,8 @@ cdef Obj make_gap_matrix(sage_list, gap_ring) except NULL:
else:
elem = <GapElement>x

AddList(l, elem.value)
return l
AddList(l.value, elem.value)
return l.value


cdef char *capture_stdout(Obj func, Obj obj):
Expand Down

0 comments on commit da2e9e6

Please sign in to comment.