@@ -51,12 +51,12 @@ namespace eosio {
51
51
internal_use_do_not_use::set_call_return_value (mem, len);
52
52
}
53
53
54
- // Request a sync call is read_write or read_only. Default is read_write
55
- enum execution_mode { read_write = 0 , read_only = 1 };
54
+ // Indicate whether a sync call is read_write or read_only. Default is read_write
55
+ enum access_mode { read_write = 0 , read_only = 1 };
56
56
57
- // Behaviour of a sync call if the receiver does not support sync calls
57
+ // Indicate the action to take if the receiver does not support sync calls.
58
58
// Default is abort
59
- enum on_call_not_supported_mode { abort = 0 , no_op = 1 };
59
+ enum support_mode { abort = 0 , no_op = 1 };
60
60
61
61
struct call_data_header {
62
62
uint32_t version = 0 ;
@@ -80,7 +80,7 @@ namespace eosio {
80
80
* get();
81
81
* @endcode
82
82
*/
83
- template <eosio::name::raw Func_Name, auto Func_Ref, execution_mode Exec_Mode=execution_mode ::read_write, on_call_not_supported_mode Not_Supported_Mode = on_call_not_supported_mode ::abort>
83
+ template <eosio::name::raw Func_Name, auto Func_Ref, access_mode Access_Mode=access_mode ::read_write, support_mode Support_Mode = support_mode ::abort>
84
84
struct call_wrapper {
85
85
template <typename Receiver>
86
86
constexpr call_wrapper (Receiver&& receiver)
@@ -97,7 +97,7 @@ namespace eosio {
97
97
static_assert (detail::type_check<Func_Ref, Args...>());
98
98
99
99
uint64_t flags = 0x00 ;
100
- if constexpr (Exec_Mode == execution_mode ::read_only) {
100
+ if constexpr (Access_Mode == access_mode ::read_only) {
101
101
flags = 0x01 ;
102
102
}
103
103
@@ -109,15 +109,15 @@ namespace eosio {
109
109
auto ret_val_size = internal_use_do_not_use::call (receiver.value , flags, data.data (), data.size ());
110
110
111
111
if (ret_val_size < 0 ) {
112
- if constexpr (Not_Supported_Mode == on_call_not_supported_mode ::abort) {
113
- check (false , " receiver does not support sync call while on_call_not_supported_mode is set to abort" );
112
+ if constexpr (Support_Mode == support_mode ::abort) {
113
+ check (false , " receiver does not support sync call but support_mode is set to abort" );
114
114
} else {
115
115
if constexpr (std::is_void<ret_type>::value) {
116
116
return ;
117
117
} else if constexpr (std::is_default_constructible_v<ret_type>) {
118
118
return {};
119
119
} else {
120
- static_assert (std::is_default_constructible_v<ret_type>, " Return type of on_call_not_supported_mode ::no_op function must be default constructible" );
120
+ static_assert (std::is_default_constructible_v<ret_type>, " Return type of support_mode ::no_op function must be default constructible" );
121
121
}
122
122
}
123
123
}
0 commit comments