@@ -2488,53 +2488,32 @@ cdef class GapElement_Function(GapElement):
2488
2488
"""
2489
2489
cdef Obj result = NULL
2490
2490
cdef Obj arg_list
2491
- cdef int i, n = len (args)
2491
+ cdef int n = len (args)
2492
2492
2493
- if n > 0 :
2493
+ if n > 0 and n <= 3 :
2494
2494
libgap = self .parent()
2495
2495
a = [x if isinstance (x, GapElement) else libgap(x) for x in args]
2496
2496
2497
2497
try :
2498
2498
sig_GAP_Enter()
2499
2499
sig_on()
2500
2500
if n == 0 :
2501
- result = CALL_0ARGS (self .value)
2501
+ result = GAP_CallFunc0Args (self .value)
2502
2502
elif n == 1 :
2503
- result = CALL_1ARGS (self .value,
2503
+ result = GAP_CallFunc1Args (self .value,
2504
2504
(< GapElement> a[0 ]).value)
2505
2505
elif n == 2 :
2506
- result = CALL_2ARGS (self .value,
2506
+ result = GAP_CallFunc2Args (self .value,
2507
2507
(< GapElement> a[0 ]).value,
2508
2508
(< GapElement> a[1 ]).value)
2509
2509
elif n == 3 :
2510
- result = CALL_3ARGS (self .value,
2510
+ result = GAP_CallFunc3Args (self .value,
2511
2511
(< GapElement> a[0 ]).value,
2512
2512
(< GapElement> a[1 ]).value,
2513
2513
(< GapElement> a[2 ]).value)
2514
- elif n == 4 :
2515
- result = CALL_4ARGS(self .value,
2516
- (< GapElement> a[0 ]).value,
2517
- (< GapElement> a[1 ]).value,
2518
- (< GapElement> a[2 ]).value,
2519
- (< GapElement> a[3 ]).value)
2520
- elif n == 5 :
2521
- result = CALL_5ARGS(self .value,
2522
- (< GapElement> a[0 ]).value,
2523
- (< GapElement> a[1 ]).value,
2524
- (< GapElement> a[2 ]).value,
2525
- (< GapElement> a[3 ]).value,
2526
- (< GapElement> a[4 ]).value)
2527
- elif n == 6 :
2528
- result = CALL_6ARGS(self .value,
2529
- (< GapElement> a[0 ]).value,
2530
- (< GapElement> a[1 ]).value,
2531
- (< GapElement> a[2 ]).value,
2532
- (< GapElement> a[3 ]).value,
2533
- (< GapElement> a[4 ]).value,
2534
- (< GapElement> a[5 ]).value)
2535
- elif n >= 7 :
2514
+ else :
2536
2515
arg_list = make_gap_list(args)
2537
- result = CALL_XARGS (self .value, arg_list)
2516
+ result = GAP_CallFuncList (self .value, arg_list)
2538
2517
sig_off()
2539
2518
finally :
2540
2519
GAP_Leave()
0 commit comments