@@ -137,16 +137,15 @@ using WFHandlerTraits = CallableTraitsHelper<WFHandlerTraitsImpl, C>;
137137
138138template <typename Serializer> class StructuredYieldBase {
139139public:
140- StructuredYieldBase (orc_rt_SessionRef Session, uint64_t CallId,
141- orc_rt_WrapperFunctionReturn Return, Serializer &&S)
142- : Session(Session), CallId(CallId), Return(Return),
143- S (std::forward<Serializer>(S)) {}
140+ StructuredYieldBase (orc_rt_SessionRef S, uint64_t CallId,
141+ orc_rt_WrapperFunctionReturn Return, Serializer &&Z)
142+ : S(S), CallId(CallId), Return(Return), Z(std::forward<Serializer>(Z)) {}
144143
145144protected:
146- orc_rt_SessionRef Session ;
145+ orc_rt_SessionRef S ;
147146 uint64_t CallId;
148147 orc_rt_WrapperFunctionReturn Return;
149- std::decay_t <Serializer> S ;
148+ std::decay_t <Serializer> Z ;
150149};
151150
152151template <typename RetT, typename Serializer> class StructuredYield ;
@@ -157,10 +156,10 @@ class StructuredYield<std::tuple<RetT>, Serializer>
157156public:
158157 using StructuredYieldBase<Serializer>::StructuredYieldBase;
159158 void operator ()(RetT &&R) {
160- if (auto ResultBytes = this ->S .result ().serialize (std::forward<RetT>(R)))
161- this ->Return (this ->Session , this ->CallId , ResultBytes->release ());
159+ if (auto ResultBytes = this ->Z .result ().serialize (std::forward<RetT>(R)))
160+ this ->Return (this ->S , this ->CallId , ResultBytes->release ());
162161 else
163- this ->Return (this ->Session , this ->CallId ,
162+ this ->Return (this ->S , this ->CallId ,
164163 WrapperFunctionBuffer::createOutOfBandError (
165164 " Could not serialize wrapper function result data" )
166165 .release ());
@@ -173,8 +172,7 @@ class StructuredYield<std::tuple<>, Serializer>
173172public:
174173 using StructuredYieldBase<Serializer>::StructuredYieldBase;
175174 void operator ()() {
176- this ->Return (this ->Session , this ->CallId ,
177- WrapperFunctionBuffer ().release ());
175+ this ->Return (this ->S , this ->CallId , WrapperFunctionBuffer ().release ());
178176 }
179177};
180178
@@ -251,12 +249,12 @@ struct WrapperFunction {
251249 // /
252250 // /
253251 // / static void adder_add_async_sps_wrapper(
254- // / orc_rt_SessionRef Session , uint64_t CallId,
252+ // / orc_rt_SessionRef S , uint64_t CallId,
255253 // / orc_rt_WrapperFunctionReturn Return,
256254 // / orc_rt_WrapperFunctionBuffer ArgBytes) {
257255 // / using SPSSig = SPSString(SPSExecutorAddr, int32_t, bool);
258256 // / SPSWrapperFunction<SPSSig>::handle(
259- // / Session , CallId, Return, ArgBytes,
257+ // / S , CallId, Return, ArgBytes,
260258 // / WrapperFunction::handleWithAsyncMethod(&MyClass::myMethod));
261259 // / }
262260 // / @endcode
@@ -313,12 +311,12 @@ struct WrapperFunction {
313311 // /
314312 // /
315313 // / static void adder_add_sync_sps_wrapper(
316- // / orc_rt_SessionRef Session , uint64_t CallId,
314+ // / orc_rt_SessionRef S , uint64_t CallId,
317315 // / orc_rt_WrapperFunctionReturn Return,
318316 // / orc_rt_WrapperFunctionBuffer ArgBytes) {
319317 // / using SPSSig = SPSString(SPSExecutorAddr, int32_t, bool);
320318 // / SPSWrapperFunction<SPSSig>::handle(
321- // / Session , CallId, Return, ArgBytes,
319+ // / S , CallId, Return, ArgBytes,
322320 // / WrapperFunction::handleWithSyncMethod(&Adder::addSync));
323321 // / }
324322 // / @endcode
@@ -336,7 +334,7 @@ struct WrapperFunction {
336334 // / given Caller object.
337335 template <typename Caller, typename Serializer, typename ResultHandler,
338336 typename ... ArgTs>
339- static void call (Caller &&C, Serializer &&S , ResultHandler &&RH,
337+ static void call (Caller &&C, Serializer &&Z , ResultHandler &&RH,
340338 ArgTs &&...Args) {
341339 typedef CallableArgInfo<ResultHandler> ResultHandlerTraits;
342340 static_assert (std::is_void_v<typename ResultHandlerTraits::return_type>,
@@ -346,16 +344,15 @@ struct WrapperFunction {
346344 " Result-handler should have exactly one argument" );
347345 typedef typename ResultHandlerTraits::args_tuple_type ResultTupleType;
348346
349- if (auto ArgBytes = S .arguments ().serialize (std::forward<ArgTs>(Args)...)) {
347+ if (auto ArgBytes = Z .arguments ().serialize (std::forward<ArgTs>(Args)...)) {
350348 C (
351- [RH = std::move (RH),
352- S = std::move (S)](orc_rt_SessionRef Session,
353- WrapperFunctionBuffer ResultBytes) mutable {
349+ [RH = std::move (RH), Z = std::move (Z)](
350+ orc_rt_SessionRef S, WrapperFunctionBuffer ResultBytes) mutable {
354351 if (const char *ErrMsg = ResultBytes.getOutOfBandError ())
355352 RH (make_error<StringError>(ErrMsg));
356353 else
357354 RH (detail::ResultDeserializer<ResultTupleType, Serializer>::
358- deserialize (std::move (ResultBytes), S ));
355+ deserialize (std::move (ResultBytes), Z ));
359356 },
360357 std::move (*ArgBytes));
361358 } else
@@ -368,9 +365,9 @@ struct WrapperFunction {
368365 // / This utility deserializes and serializes arguments and return values
369366 // / (using the given Serializer), and calls the given handler.
370367 template <typename Serializer, typename Handler>
371- static void handle (orc_rt_SessionRef Session , uint64_t CallId,
368+ static void handle (orc_rt_SessionRef S , uint64_t CallId,
372369 orc_rt_WrapperFunctionReturn Return,
373- WrapperFunctionBuffer ArgBytes, Serializer &&S ,
370+ WrapperFunctionBuffer ArgBytes, Serializer &&Z ,
374371 Handler &&H) {
375372 typedef detail::WFHandlerTraits<Handler> HandlerTraits;
376373 typedef typename HandlerTraits::ArgTupleType ArgTuple;
@@ -380,16 +377,16 @@ struct WrapperFunction {
380377 typedef typename CallableArgInfo<Yield>::args_tuple_type RetTupleType;
381378
382379 if (ArgBytes.getOutOfBandError ())
383- return Return (Session , CallId, ArgBytes.release ());
380+ return Return (S , CallId, ArgBytes.release ());
384381
385- if (auto Args = S .arguments ().template deserialize <ArgTuple>(ArgBytes))
382+ if (auto Args = Z .arguments ().template deserialize <ArgTuple>(ArgBytes))
386383 std::apply (HandlerTraits::forwardArgsAsRequested (bind_front (
387384 std::forward<Handler>(H),
388385 detail::StructuredYield<RetTupleType, Serializer>(
389- Session , CallId, Return, std::move (S )))),
386+ S , CallId, Return, std::move (Z )))),
390387 *Args);
391388 else
392- Return (Session , CallId,
389+ Return (S , CallId,
393390 WrapperFunctionBuffer::createOutOfBandError (
394391 " Could not deserialize wrapper function arg data" )
395392 .release ());
0 commit comments