1.1 --- a/templates/ops.h Sun Feb 19 19:06:22 2017 +0100
1.2 +++ b/templates/ops.h Sun Feb 19 22:24:36 2017 +0100
1.3 @@ -73,21 +73,8 @@
1.4 int __test_context_update(__ref context, __attr attr);
1.5 __attr __test_context(__ref context, __attr attr);
1.6 __attr __update_context(__ref context, __attr attr);
1.7 -
1.8 -/* Revert the local context to that employed by the attribute if the supplied
1.9 - context is not appropriate. */
1.10 -
1.11 -#define __test_context_revert(__TARGET, __CONTEXT, __ATTR) \
1.12 - (__test_context_update(__CONTEXT, __ATTR) \
1.13 - ? __ATTR \
1.14 - : (__set_context(__TARGET, __CONTEXT_AS_VALUE(__ATTR)), __ATTR))
1.15 -
1.16 -/* Set the local context to the specified context if appropriate. */
1.17 -
1.18 -#define __test_context_static(__TARGET, __CONTEXT, __REF) \
1.19 - (__test_context_update(__CONTEXT, (__attr) {.value=__REF}) \
1.20 - ? (__set_context(__TARGET, (__attr) {.value=__CONTEXT}), (__attr) {.value=__REF}) \
1.21 - : (__attr) {.value=__REF})
1.22 +__attr __test_context_revert(int target, __ref context, __attr attr, __ref contexts[]);
1.23 +__attr __test_context_static(int target, __ref context, __ref value, __ref contexts[]);
1.24
1.25 #define __get_context(__TARGET) (__tmp_contexts[__TARGET])
1.26 #define __set_context(__TARGET, __ATTR) (__tmp_contexts[__TARGET] = (__ATTR).value)