@@ -984,7 +984,7 @@ cdef class GapElement(RingElement):
984
984
GAPError: Error, no method found!
985
985
Error, no 1st choice method found for `+ ' on 2 arguments
986
986
"""
987
- cdef volatile Obj result
987
+ cdef Obj result
988
988
try :
989
989
sig_GAP_Enter()
990
990
sig_on()
@@ -1012,7 +1012,7 @@ cdef class GapElement(RingElement):
1012
1012
...
1013
1013
GAPError: Error, no method found! ...
1014
1014
"""
1015
- cdef volatile Obj result
1015
+ cdef Obj result
1016
1016
try :
1017
1017
sig_GAP_Enter()
1018
1018
sig_on()
@@ -1041,7 +1041,7 @@ cdef class GapElement(RingElement):
1041
1041
GAPError: Error, no method found!
1042
1042
Error, no 1st choice method found for `* ' on 2 arguments
1043
1043
"""
1044
- cdef volatile Obj result
1044
+ cdef Obj result
1045
1045
try :
1046
1046
sig_GAP_Enter()
1047
1047
sig_on()
@@ -1075,7 +1075,7 @@ cdef class GapElement(RingElement):
1075
1075
...
1076
1076
GAPError: Error, Rational operations: <divisor> must not be zero
1077
1077
"""
1078
- cdef volatile Obj result
1078
+ cdef Obj result
1079
1079
try :
1080
1080
sig_GAP_Enter()
1081
1081
sig_on()
@@ -1102,7 +1102,7 @@ cdef class GapElement(RingElement):
1102
1102
GAPError: Error, no method found!
1103
1103
Error, no 1st choice method found for `mod' on 2 arguments
1104
1104
"""
1105
- cdef volatile Obj result
1105
+ cdef Obj result
1106
1106
try :
1107
1107
sig_GAP_Enter()
1108
1108
sig_on()
@@ -1150,7 +1150,6 @@ cdef class GapElement(RingElement):
1150
1150
GAPError: Error, no method found! Error, no 1st choice
1151
1151
method found for `InverseMutable' on 1 arguments
1152
1152
"""
1153
- cdef volatile Obj result
1154
1153
try :
1155
1154
sig_GAP_Enter()
1156
1155
sig_on()
@@ -2481,10 +2480,6 @@ cdef class GapElement_Function(GapElement):
2481
2480
GAPError: Error, no method found!
2482
2481
Error, no 1st choice method found for `SumOp' on 2 arguments
2483
2482
2484
- sage: rnd=[1,2,3]
2485
- sage: libgap.Sum(rnd)
2486
- 6
2487
-
2488
2483
sage: for i in range(100):
2489
2484
....: rnd = [ randint(-10,10) for i in range(randint(0,7)) ]
2490
2485
....: # compute the sum in GAP
@@ -2500,20 +2495,18 @@ cdef class GapElement_Function(GapElement):
2500
2495
sage: libgap_exec('echo hello from the shell')
2501
2496
hello from the shell
2502
2497
"""
2503
- cdef volatile Obj result = NULL
2504
- cdef volatile Obj arg_list
2498
+ cdef Obj result = NULL
2499
+ cdef Obj arg_list
2505
2500
cdef int n = len (args)
2506
2501
cdef volatile Obj v2
2507
2502
2508
2503
if n > 0 and n <= 3 :
2509
2504
libgap = self .parent()
2510
2505
a = [x if isinstance (x, GapElement) else libgap(x) for x in args]
2511
2506
2512
- cdef bint sig_on_called = False
2513
2507
try :
2514
2508
sig_GAP_Enter()
2515
2509
sig_on()
2516
- sig_on_called = True
2517
2510
if n == 0 :
2518
2511
result = GAP_CallFunc0Args(self .value)
2519
2512
elif n == 1 :
@@ -2533,12 +2526,6 @@ cdef class GapElement_Function(GapElement):
2533
2526
arg_list = make_gap_list(args)
2534
2527
result = GAP_CallFuncList(self .value, arg_list)
2535
2528
sig_off()
2536
- sig_on_called = False
2537
- except Exception :
2538
- # If any exception occurred, ensure we clean up properly
2539
- if sig_on_called:
2540
- sig_off()
2541
- raise
2542
2529
finally :
2543
2530
GAP_Leave()
2544
2531
if result == NULL :
0 commit comments