Skip to content

Commit e1c34dd

Browse files
committed
gap: stop using T_CHAR
1 parent 853d070 commit e1c34dd

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/sage/libs/gap/element.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,9 @@ cdef GapElement make_any_gap_element(parent, Obj obj):
262262
263263
TESTS::
264264
265-
sage: T_CHAR = libgap.eval("'c'"); T_CHAR
265+
sage: x = libgap.eval("'c'"); x
266266
"c"
267-
sage: type(T_CHAR)
267+
sage: type(x)
268268
<class 'sage.libs.gap.element.GapElement_String'>
269269
270270
sage: libgap.eval("['a', 'b', 'c']") # gap strings are also lists of chars
@@ -320,7 +320,7 @@ cdef GapElement make_any_gap_element(parent, Obj obj):
320320
return make_GapElement_String(parent, obj)
321321
elif GAP_IsList(obj):
322322
return make_GapElement_List(parent, obj)
323-
elif num == T_CHAR:
323+
elif GAP_ValueOfChar(obj) != -1:
324324
ch = make_GapElement(parent, obj).IntChar().sage()
325325
return make_GapElement_String(parent, make_gap_string(chr(ch)))
326326
result = make_GapElement(parent, obj)

src/sage/libs/gap/gap_includes.pxd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ cdef extern from "gap/objects.h" nogil:
116116
T_PERM2
117117
T_PERM4
118118
T_BOOL
119-
T_CHAR
120119
T_FUNCTION
121120
T_COMOBJ
122121
T_POSOBJ

0 commit comments

Comments
 (0)