1.1 --- a/templates/progops.c Mon Mar 06 22:29:36 2017 +0100
1.2 +++ b/templates/progops.c Tue Mar 07 00:28:18 2017 +0100
1.3 @@ -24,6 +24,7 @@
1.4 #include "progtypes.h"
1.5 #include "main.h"
1.6 #include "exceptions.h"
1.7 +#include "calls.h"
1.8
1.9 /* Generic instantiation operations, defining common members. */
1.10
1.11 @@ -251,14 +252,19 @@
1.12 }
1.13 }
1.14
1.15 - /* Call with the prepared arguments. */
1.16 + /* Call with the prepared arguments via a special adaptor function that
1.17 + converts the array to an argument list. */
1.18
1.19 - return (always_callable ? __get_function(allargs[0].value, target) : __check_and_get_function(allargs[0].value, target))(allargs);
1.20 + return __call_with_args(
1.21 + always_callable ?
1.22 + __get_function(allargs[0].value, target) :
1.23 + __check_and_get_function(allargs[0].value, target),
1.24 + allargs, max);
1.25 }
1.26
1.27 /* Error routines. */
1.28
1.29 -__attr __unbound_method(__attr args[])
1.30 +__attr __unbound_method(__attr __self)
1.31 {
1.32 __attr excargs[1];
1.33 __attr exc = __new___builtins___core_UnboundMethodInvocation(excargs);
1.34 @@ -280,10 +286,8 @@
1.35
1.36 int __BOOL(__attr attr)
1.37 {
1.38 - __attr args[2] = {__NULL, attr};
1.39 -
1.40 /* Invoke the bool function with the object and test against True. */
1.41
1.42 return (attr.value == __builtins___boolean_True.value) ||
1.43 - (__fn___builtins___boolean_bool(args).value == __builtins___boolean_True.value);
1.44 + (__fn___builtins___boolean_bool(__NULL, attr).value == __builtins___boolean_True.value);
1.45 }