1.1 --- a/templates/ops.c Sun Feb 19 19:06:22 2017 +0100
1.2 +++ b/templates/ops.c Sun Feb 19 22:24:36 2017 +0100
1.3 @@ -249,6 +249,25 @@
1.4 return __new_wrapper(context, attr);
1.5 }
1.6
1.7 +__attr __test_context_revert(int target, __ref context, __attr attr, __ref contexts[])
1.8 +{
1.9 + /* Revert the local context to that employed by the attribute if the
1.10 + supplied context is not appropriate. */
1.11 +
1.12 + if (!__test_context_update(context, attr))
1.13 + contexts[target] = __CONTEXT_AS_VALUE(attr).value;
1.14 + return attr;
1.15 +}
1.16 +
1.17 +__attr __test_context_static(int target, __ref context, __ref value, __ref contexts[])
1.18 +{
1.19 + /* Set the local context to the specified context if appropriate. */
1.20 +
1.21 + if (__test_context_update(context, (__attr) {.value=value}))
1.22 + contexts[target] = context;
1.23 + return (__attr) {.value=value};
1.24 +}
1.25 +
1.26 /* Context testing for invocations. */
1.27
1.28 int __type_method_invocation(__ref context, __attr target)