--- src/sage/env.py.orig 2020-01-01 04:03:10.000000000 -0700 +++ src/sage/env.py 2020-03-13 09:51:49.255840082 -0600 @@ -174,7 +174,7 @@ var('CONWAY_POLYNOMIALS_DATA_DIR', joi var('GRAPHS_DATA_DIR', join(SAGE_SHARE, 'graphs')) var('ELLCURVE_DATA_DIR', join(SAGE_SHARE, 'ellcurves')) var('POLYTOPE_DATA_DIR', join(SAGE_SHARE, 'reflexive_polytopes')) -var('GAP_ROOT_DIR', join(SAGE_SHARE, 'gap')) +var('GAP_ROOT_DIR', join('/usr','lib','gap')) var('THEBE_DIR', join(SAGE_SHARE, 'thebe')) var('COMBINATORIAL_DESIGN_DATA_DIR', join(SAGE_SHARE, 'combinatorial_designs')) var('CREMONA_MINI_DATA_DIR', join(SAGE_SHARE, 'cremona')) --- src/sage/libs/gap/element.pyx.orig 2020-01-01 04:03:10.000000000 -0700 +++ src/sage/libs/gap/element.pyx 2020-03-13 10:38:15.632637753 -0600 @@ -264,7 +264,7 @@ cdef Obj make_gap_string(sage_string) ex try: GAP_Enter() b = str_to_bytes(sage_string) - C_NEW_STRING(result, len(b), b) + result = MakeStringWithLen(b, len(b)) return result finally: GAP_Leave() @@ -955,7 +955,7 @@ cdef class GapElement(RingElement): sig_on() try: GAP_Enter() - return EQ(self.value, c_other.value) + return EQ(self.value, c_other.value) finally: GAP_Leave() sig_off() @@ -977,7 +977,7 @@ cdef class GapElement(RingElement): sig_on() try: GAP_Enter() - return LT(self.value, c_other.value) + return LT(self.value, c_other.value) finally: GAP_Leave() sig_off() @@ -1205,7 +1205,7 @@ cdef class GapElement(RingElement): sage: a.is_function() False """ - return IS_FUNC(self.value) + return IS_FUNC(self.value) def is_list(self): r""" @@ -1222,7 +1222,7 @@ cdef class GapElement(RingElement): sage: libgap.eval('3/2').is_list() False """ - return IS_LIST(self.value) + return IS_LIST(self.value) def is_record(self): r""" @@ -1239,7 +1239,7 @@ cdef class GapElement(RingElement): sage: libgap.eval('rec(a:=1, b:=3)').is_record() True """ - return IS_REC(self.value) + return IS_REC(self.value) cpdef is_bool(self): r""" @@ -1272,7 +1272,7 @@ cdef class GapElement(RingElement): sage: libgap('this is a string').is_string() True """ - return IS_STRING(self.value) + return IS_STRING(self.value) def is_permutation(self): r""" @@ -1458,7 +1458,7 @@ cdef class GapElement_Integer(GapElement sage: N.IsInt() true """ - return IS_INTOBJ(self.value) + return IS_INTOBJ(self.value) def _rational_(self): r""" @@ -2797,7 +2797,7 @@ cdef class GapElement_List(GapElement): ... ValueError: too many indices """ - cdef int j + cdef Int j cdef Obj obj = self.value if isinstance(i, tuple): @@ -2868,7 +2868,7 @@ cdef class GapElement_List(GapElement): if not IS_MUTABLE_OBJ(self.value): raise TypeError('immutable Gap object does not support item assignment') - cdef int j + cdef Int j cdef Obj obj = self.value if isinstance(i, tuple): --- src/sage/libs/gap/gap_includes.pxd.orig 2020-01-01 04:03:10.000000000 -0700 +++ src/sage/libs/gap/gap_includes.pxd 2020-03-13 10:32:21.845358454 -0600 @@ -12,8 +12,8 @@ cdef extern from "gap/system.h" nogil: ctypedef char Char - ctypedef int Int - ctypedef unsigned int UInt + ctypedef long Int + ctypedef unsigned long UInt ctypedef void* Obj @@ -24,8 +24,8 @@ cdef extern from "gap/ariths.h" nogil: Obj QUO(Obj, Obj) Obj POW(Obj, Obj) Obj MOD(Obj, Obj) - bint EQ(Obj opL, Obj opR) - bint LT(Obj opL, Obj opR) + Int EQ(Obj opL, Obj opR) + Int LT(Obj opL, Obj opR) cdef extern from "gap/bool.h" nogil: @@ -34,7 +34,7 @@ cdef extern from "gap/bool.h" nogil: cdef extern from "gap/calls.h" nogil: - bint IS_FUNC(Obj) + Int IS_FUNC(Obj) Obj CALL_0ARGS(Obj f) # 0 arguments Obj CALL_1ARGS(Obj f, Obj a1) # 1 argument Obj CALL_2ARGS(Obj f, Obj a1, Obj a2) @@ -56,7 +56,7 @@ cdef extern from "gap/gasman_intern.h" n cdef extern from "gap/gvars.h" nogil: - UInt GVarName "GVarName"(char* name) + UInt GVarName "GVarName"(const char* name) void AssGVar "AssGVar"(UInt gvar, Obj val) @@ -65,7 +65,7 @@ cdef extern from "gap/integer.h" nogil: cdef extern from "gap/intobj.h" nogil: - bint IS_INTOBJ(Obj obj) + Int IS_INTOBJ(Obj obj) Obj INTOBJ_INT(Int) Int INT_INTOBJ(Obj) @@ -95,11 +95,11 @@ cdef extern from "gap/libgap-api.h" nogi cdef extern from "gap/lists.h" nogil: - bint IS_LIST(Obj lst) - int LEN_LIST(Obj lst) - Obj ELM_LIST(Obj lst, int pos) - Obj ELM0_LIST(Obj lst, int pos) - void ASS_LIST(Obj lst, int pos, Obj elt) + Int IS_LIST(Obj lst) + Int LEN_LIST(Obj lst) + Obj ELM_LIST(Obj lst, Int pos) + Obj ELM0_LIST(Obj lst, Int pos) + void ASS_LIST(Obj lst, Int pos, Obj elt) cdef extern from "gap/listfunc.h" nogil: @@ -111,13 +111,13 @@ cdef extern from "gap/macfloat.h" nogil: cdef extern from "gap/objects.h" nogil: - bint IS_MUTABLE_OBJ(Obj obj) + Int IS_MUTABLE_OBJ(Obj obj) Obj SHALLOW_COPY_OBJ(Obj obj) - Obj CopyObj(Obj obj, int mut) + Obj CopyObj(Obj obj, Int mut) UInt SIZE_OBJ(Obj obj) UInt TNUM_OBJ(Obj obj) - char* TNAM_OBJ(Obj obj) + const char* TNAM_OBJ(Obj obj) cdef enum TNUM: T_INT @@ -147,23 +147,23 @@ cdef extern from "gap/objects.h" nogil: cdef extern from "gap/precord.h" nogil: - Obj NEW_PREC(int len) - int LEN_PREC(Obj rec) - int GET_RNAM_PREC(Obj rec, int i) - Obj GET_ELM_PREC(Obj rec, int i) + Obj NEW_PREC(UInt len) + UInt LEN_PREC(Obj rec) + Int GET_RNAM_PREC(Obj rec, UInt i) + Obj GET_ELM_PREC(Obj rec, UInt i) void AssPRec(Obj rec, UInt rnam, Obj val) cdef extern from "gap/records.h" nogil: - char* NAME_RNAM(UInt rnam) - bint IS_REC(Obj obj) + Obj NAME_RNAM(UInt rnam) + Int IS_REC(Obj obj) Obj ELM_REC(Obj rec, UInt rnam) - UInt RNamName(Char* name) + UInt RNamName(const Char* name) cdef extern from "gap/stringobj.h" nogil: char* CSTR_STRING(Obj list) - bint IS_STRING(Obj obj) - bint IsStringConv(Obj obj) - Obj NEW_STRING(Int) - void C_NEW_STRING(Obj new_gap_string, int length, char* c_string) + Int IS_STRING(Obj obj) + Int IsStringConv(Obj obj) + Obj NEW_STRING(Int len) + Obj MakeStringWithLen(const char *buf, size_t len) --- src/sage/libs/gap/util.pyx.orig 2020-01-01 04:03:10.000000000 -0700 +++ src/sage/libs/gap/util.pyx 2020-03-13 10:23:13.675207968 -0600 @@ -386,7 +386,7 @@ cdef Obj gap_eval(str gap_string) except """ initialize() cdef Obj result - cdef int i, j, nresults + cdef Int nresults # Careful: We need to keep a reference to the bytes object here # so that Cython doesn't deallocate it before GAP is done with