1.1 --- a/templates/native.c Tue Nov 01 18:23:42 2016 +0100
1.2 +++ b/templates/native.c Tue Nov 01 18:25:47 2016 +0100
1.3 @@ -289,8 +289,7 @@
1.4 {
1.5 #define self (__args[1])
1.6
1.7 - /* NOTE: To be written. */
1.8 - return __builtins___none_None;
1.9 + return __load_via_object(self.value, __pos___data__).data->size ? __builtins___boolean_True : __builtins___boolean_False;
1.10 #undef self
1.11 }
1.12
2.1 --- a/templates/progops.c Tue Nov 01 18:23:42 2016 +0100
2.2 +++ b/templates/progops.c Tue Nov 01 18:25:47 2016 +0100
2.3 @@ -7,6 +7,7 @@
2.4 #include "progconsts.h"
2.5 #include "progops.h"
2.6 #include "progtypes.h"
2.7 +#include "main.h"
2.8 #include <stdio.h>
2.9
2.10 /* Generic instantiation operations, defining common members. */
2.11 @@ -143,5 +144,9 @@
2.12
2.13 int __BOOL(__attr attr)
2.14 {
2.15 - return attr.value == __builtins___boolean_True.value;
2.16 + __attr args[2] = {{0, 0}, attr};
2.17 +
2.18 + /* Invoke the bool function with the object and test against True. */
2.19 +
2.20 + return __fn___builtins___boolean_bool(args).value == __builtins___boolean_True.value;
2.21 }