1.1 --- a/templates/ops.h Sat Oct 29 20:17:38 2016 +0200
1.2 +++ b/templates/ops.h Sat Oct 29 20:18:39 2016 +0200
1.3 @@ -4,8 +4,7 @@
1.4 #define __OPS_H__
1.5
1.6 #include "types.h"
1.7 -
1.8 -extern __attr null;
1.9 +#include <string.h> /* for __COPY */
1.10
1.11 /* Direct access to functions. */
1.12
1.13 @@ -88,4 +87,8 @@
1.14 #define __ATTRCODE(__ATTRNAME) (__code_##__ATTRNAME)
1.15 #define __ATTRPOS(__ATTRNAME) (__pos_##__ATTRNAME)
1.16
1.17 +/* Copying of structures. */
1.18 +
1.19 +#define __COPY(__SOURCE, __TARGET) (memcpy(__TARGET, __SOURCE, sizeof(__SOURCE)))
1.20 +
1.21 #endif /* __OPS_H__ */
2.1 --- a/templates/progops.c Sat Oct 29 20:17:38 2016 +0200
2.2 +++ b/templates/progops.c Sat Oct 29 20:18:39 2016 +0200
2.3 @@ -54,7 +54,7 @@
2.4 /* Check the number of arguments. */
2.5
2.6 if ((min > (nargs + nkwargs)) || ((nargs + nkwargs) > max))
2.7 - return null;
2.8 + return __NULL;
2.9
2.10 /* Copy the arguments. */
2.11
2.12 @@ -79,7 +79,7 @@
2.13 arguments. */
2.14
2.15 if ((pos == -1) || (pos < nargs))
2.16 - return null;
2.17 + return __NULL;
2.18
2.19 /* Set the argument using the appropriate position. */
2.20