Skip to content

Commit

Permalink
declare the last arg to GAP_CallFunc3Args volatile
Browse files Browse the repository at this point in the history
This appears to fix #37026
  • Loading branch information
dimpase committed May 6, 2024
1 parent 744939e commit 483474a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sage/libs/gap/element.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2504,6 +2504,7 @@ cdef class GapElement_Function(GapElement):
cdef Obj result = NULL
cdef Obj arg_list
cdef int n = len(args)
cdef volatile Obj v2

if n > 0 and n <= 3:
libgap = self.parent()
Expand All @@ -2522,10 +2523,11 @@ cdef class GapElement_Function(GapElement):
(<GapElement>a[0]).value,
(<GapElement>a[1]).value)
elif n == 3:
v2 = (<GapElement>a[2]).value
result = GAP_CallFunc3Args(self.value,
(<GapElement>a[0]).value,
(<GapElement>a[1]).value,
(<GapElement>a[2]).value)
v2)
else:
arg_list = make_gap_list(args)
result = GAP_CallFuncList(self.value, arg_list)
Expand Down

0 comments on commit 483474a

Please sign in to comment.