# HG changeset patch # User Paul Boddie # Date 1489343813 -3600 # Node ID 0e446cf36ed2fe1aa37e2b35cce43f61fa742ff2 # Parent 26281477b9c12728c24b6dbe16a7ac94eb797024 Introduced __ATTRVALUE macro usage. diff -r 26281477b9c1 -r 0e446cf36ed2 templates/ops.c --- a/templates/ops.c Sun Mar 12 17:56:55 2017 +0100 +++ b/templates/ops.c Sun Mar 12 19:36:53 2017 +0100 @@ -34,17 +34,17 @@ __attr __load_static_ignore(__ref obj) { - return (__attr) {.value=obj}; + return __ATTRVALUE(obj); } __attr __load_static_replace(__ref context, __ref obj) { - return __update_context(context, (__attr) {.value=obj}); + return __update_context(context, __ATTRVALUE(obj)); } __attr __load_static_test(__ref context, __ref obj) { - return __test_context(context, (__attr) {.value=obj}); + return __test_context(context, __ATTRVALUE(obj)); } /* Direct retrieval operations, returning and setting attributes. */ @@ -281,9 +281,9 @@ { /* Set the local context to the specified context if appropriate. */ - if (__test_context_update(context, (__attr) {.value=value})) + if (__test_context_update(context, __ATTRVALUE(value))) contexts[target] = context; - return (__attr) {.value=value}; + return __ATTRVALUE(value); } /* Context testing for invocations. */