theLink 10.0
Loading...
Searching...
No Matches
MqHigh_py.c
Go to the documentation of this file.
1
9/* LABEL-NO */
10
11#define META_FILE_NAME "MqHigh_py.c"
12
14
15#define OT_SETUP_CONSTR
16#define OT_retObj_CONSTR(mng) OT_retObj_SET(NS(MqContextC_New)((PyTypeObject*)class,mng))
17
18#define SetupRtFromObj_XN(hdl) MkRtSetup_XN(hdl)
19#define OT_SETUP_hdl OT_SETUP_hdl_tmpl(MqContextC)
20
21/* LABEL-END */
22
23#define META_CONTEXT_S hdl
24
25OT_ProcRet NS(MqContextC_Send) (MqContextC_ARGS) {
26
27#define highSELF "ctx.Send"
28
29#define highSKIP ((MK_NUM)__skip)
30#define highSKIP_SHIFT 0
31#define highSIZE ((MK_NUM)objc)
32
33#define highSIZE_AVAILABLE 1
34#define highREAD_RETURN_LIST 1
35#define highREAD_HAS_REFERENCE 0
36
37#define highINITcstr OT_CHECK_STR(cstr)
38#define highRETok goto end;
39#define highRETerror OT_ERROR_META_2_LNG(mqctx); \
40 retObj = NULL;
41
42#define highCMD "%s '%s' ... '%s' ..."
43
44#define highTRAN(str) OT_CHECK_C_COPY(str,MQ_SEND_TRANSACTION_TOKEN_SIZE)
45#define highTOKEN(str) OT_CHECK_C_COPY(str,MQ_SEND_TOKEN_SIGNATURE_SIZE)
46#define highTIME(t) OT_CHECK_TIME_T(timeout)
47#define highCALL(f) OT_CHECK_CALLABLE(f)
48
49#define highERRORnative if (PyErr_Occurred()) {OT_ERROR_LNG_2_META(mqctx);}
50
51#define highRETURN highRETURN_type_S
52#define highFARGS(f) NS(ServiceCall),f,NS(ServiceFree)
53
54#define highSend(T) { \
55 high_T_##T val = 0;\
56 OT_CHECK_REQUIRED(OT_CHECK_##T(val)); \
57 MkErrorCheck(MqSend##T(mqctx,val));\
58 break; \
59}
60
61#define highSend2(T) { \
62 high_T_##T val = 0;\
63 OT_CHECK_REQUIRED(OT_CHECK_##T(val,MK_NULL_NO)); \
64 MkErrorCheck(MqSend##T(mqctx,val));\
65 break; \
66}
67
68#define highSend_I8 highSend(I8)
69#define highSend_BOL highSend(BOL)
70#define highSend_I16 highSend(I16)
71#define highSend_I32 highSend(I32)
72#define highSend_I64 highSend(I64)
73#define highSend_HDL highSend(HDL)
74#define highSend_FLT highSend(FLT)
75#define highSend_DBL highSend(DBL)
76#define highSend_STR highSend(STR)
77#define highSend_BUF highSend2(BUF);
78#define highSend_BFL { \
79 MkBufferListCreateTLS_T(bfl,5); \
80 OT_CHECK_REQUIRED(OT_CHECK_BFL(bfl,MK_NULL_NO)) \
81 enum MkErrorE ret = MqSendBFL(mqctx, bfl); \
82 MkErrorCheck(ret); \
83 break; \
84}
85#define highSend_BIN { \
86 MkBinaryR cbi = {0}; \
87 OT_CHECK_REQUIRED(OT_CHECK__ME_REF_MkBinaryR(cbi)) \
88 MkErrorCheck(MqSendBIN(mqctx, cbi)); \
89 break; \
90}
91
92#define highREADprepare OT_CHECK_NOARGS
93#define highREADinit
94
95/* python does NOT support references
96
97#define highReadRef(T,TT) { \
98 high_T_##T val; \
99 MkErrorCheck(MqRead##T(mqctx,&val)); \
100 OtErrorCheckLng(PyList_Append(RET, TT (val))) \
101 break; \
102}
103
104#define highYread highReadRef(Y, OT_TMP_BYT_OBJ);
105#define highOread highReadRef(O, OT_TMP_BOL_OBJ);
106#define highSread highReadRef(S, OT_TMP_I16_OBJ);
107#define highIread highReadRef(I, OT_TMP_I32_OBJ);
108#define highFread highReadRef(F, OT_TMP_FLT_OBJ);
109#define highWread highReadRef(W, OT_TMP_I64_OBJ);
110#define highDread highReadRef(D, OT_TMP_DBL_OBJ);
111#define highCread highReadRef(C, OT_TMP_STR_OBJ);
112#define highUread highReadRef(U, OT_TMP_BUF_OBJ);
113#define highLread highReadRef(L, OT_TMP_BFL_OBJ);
114#define highAread highReadRef(A, OT_TMP_BFL_OBJ);
115
116#define highBread { \
117 MK_BINN cbi; \
118 MK_SIZE siz; \
119 MkErrorCheck(MqReadBIN(mqctx, &cbi, &siz)); \
120 OtErrorCheckLng(PyList_Append(RET, OT_TMP_BIN_OBJ(cbi,siz))); \
121 break; \
122}
123*/
124
125 #define error error1
127 // BUG: no jump to error -> error: ‘ptr’ may be used uninitialized ...
128 OT_SETUP_VARARGS(1,99,highSELF "...");
129 #undef error
130#define mqctx hdl
131
132 PyErr_Clear();
133
134 MK_CBP fCall = NULL;
135 MK_STRN cstr = NULL;
136
137// **************************************************************************************************
138#include "tmpl/high_lng.h"
139// ********************************************************************************************
140
141 end:
143 error1:
144 return NULL;
145}
146
147// vim: nowrap
#define OT_SETUP_VARARGS(min, max, d)
#define OT_retObj_RETURN
#define OT_ProcRet
tag: nhi1-release-250425
#define NS(n)
#define MqContextC_ARGS
#define OT_SETUP_hdl
Definition MqHigh_py.c:19
#define highSELF
const MK_STRB * MK_STRN
MK_PTRB * MK_CBP
tag: nhi1-release-250425