theLink 10.0
Loading...
Searching...
No Matches
MqCall_atl.c File Reference

tag: nhi1-release-250425 More...

+ Include dependency graph for MqCall_atl.c:

Go to the source code of this file.

Macros

#define mqctx   hdl
 
#define dbgMsg(fmt, ...)
 
#define dbgObj(obj)
 
#define m   mqctx
 

Functions

enum MkErrorE atlmqmsgque_ServiceCall (MQ_SERVICE_CALL_ARGS)
 
void atlmqmsgque_ServiceFree (MQ_SERVICE_FREE_ARGS)
 
void atlmqmsgque_ServiceCopy (MQ_SERVICE_COPY_ARGS)
 

Detailed Description

tag: nhi1-release-250425

Definition in file MqCall_atl.c.

Macro Definition Documentation

◆ dbgMsg

#define dbgMsg ( fmt,
... )

Definition at line 42 of file MqCall_atl.c.

◆ dbgObj

#define dbgObj ( obj)

Definition at line 43 of file MqCall_atl.c.

◆ m

#define m   mqctx

◆ mqctx

#define mqctx   hdl

Definition at line 13 of file MqCall_atl.c.

Function Documentation

◆ atlmqmsgque_ServiceCall()

enum MkErrorE atlmqmsgque_ServiceCall ( MQ_SERVICE_CALL_ARGS )

Definition at line 46 of file MqCall_atl.c.

47{
49
50 // 1. setup environment
51 MkCallS *call = __data__;
52 assert(call->signature == MkCallS_SIG);
53
54//MkCallLog(call);
55
56 // 2. prolog
57#if 0
59#else
60# define m mqctx
61 /* 1. setup runtime */
62 OT_MK_RT_T const amkrt = call->amkrt;
63 assert (amkrt->signature == OT_MK_RT_SIG);
64 OT_ENV_T const interp = amkrt->interp;
65 assert (!Tcl_InterpDeleted(interp));
66 Tcl_ResetResult(interp);
67
68 /* 2. setup arguments */
69 Tcl_Obj *objv[5+MkProcResolve_maxArgsLen];
70
71 rescan:
72 int objc = 1;
73
74 /* 1. setup methode */
75 objv[0] = call->mth;
76
77 /* 2. setup my */
78 switch (call->type) {
80 dbgMsg("%s","MkCallS_own_method");
81 break;
82 case MkCallS_static:
83 dbgMsg("%s","MkCallS_static");
84 break;
85 case MkCallS_proc:
86 dbgMsg("%s","MkCallS_proc");
87 break;
89 dbgMsg("%s","MkCallS_other_method");
90 objv[objc++] = call->my;
91 break;
92 case MkCallS_init: {
93 dbgMsg("%s","MkCallS_init");
94 check_META(MK(ProcResolve)(OT_MK_CALL (m), call)) goto error_mq;
95 goto rescan;
96 }
97 case MkCallS_null:
98 dbgMsg("%s","MkCallS_null");
99 return MK_OK;
100 case MkCallS_error:
101 dbgMsg("%s","MkCallS_error");
102 goto error;
103 }
104# undef m
105#endif
106
107 // 3. setup CTX arg
108 objv[objc++] = META2VAL_X(mqctx);
109
110 // 4. setup user arg(s)
111 if (call->args) MK(ProcResolveAppendArgs)(call,&objc,objv);
112
113 // 3. call the callback
114 int ret = Atl_EvalObjv (interp, objc, objv, 0); /* "MK(EvalObjv)" IS NOT required !! */
115 if (ret != TCL_OK) goto error;
116
117 return MkErrorGetCodeI(&MkERROR); /* MkErrorGetCode_0E() */
118
119error:
121
122error_mq:
123 return MkErrorStack_0E();
124}
#define CallProlog(m)
#define MK(n)
MOX_ENV_T OT_ENV_T
#define MkCallS_SIG
#define check_META(code)
#define META2VAL_X(x)
#define OT_ERROR_LNG_2_META(m)
#define OT_MK_CALL
@ MkCallS_init
@ MkCallS_null
@ MkCallS_error
@ MkCallS_own_method
@ MkCallS_other_method
@ MkCallS_proc
@ MkCallS_static
#define MkProcResolve_maxArgsLen
#define OT_MK_RT_SIG
#define Atl_EvalObjv(...)
#define m
#define mqctx
Definition MqCall_atl.c:13
#define dbgMsg(fmt,...)
Definition MqCall_atl.c:42
#define error
Definition high_lng.h:339
#define MkErrorGetCodeI(e)
#define MkErrorStack_0E()
#define MkERROR
MK_OK
#define MQ_SERVICE_CALL_CHECK
enum MqCallE call
OT_ENV_T interp

◆ atlmqmsgque_ServiceCopy()

void atlmqmsgque_ServiceCopy ( MQ_SERVICE_COPY_ARGS )

Definition at line 131 of file MqCall_atl.c.

132{
133 MK(CallCopy)(MK_RT_CALL MkOBJ(mqctx), dataP);
134}
#define MkOBJ(x)
#define MK_RT_CALL

◆ atlmqmsgque_ServiceFree()

void atlmqmsgque_ServiceFree ( MQ_SERVICE_FREE_ARGS )

Definition at line 126 of file MqCall_atl.c.

127{
128 MK(CallFree) (dataP);
129}