theLink 10.0
Loading...
Searching...
No Matches
LibMqMsgque_private_py.h File Reference

tag: nhi1-release-250425 More...

#include "LibMqMsgque_py.h"
+ Include dependency graph for LibMqMsgque_private_py.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define Send_doc_extra   "[…] ctx.Send(\"CALL-SIGNATUR\",call-args …,\"TOKEN-SIGNATURE\",send-args …)"
 

Functions

enum MkErrorE pymqmsgque_ServiceCall (MQ_SERVICE_CALL_ARGS)
 
void pymqmsgque_ServiceFree (MQ_SERVICE_FREE_ARGS)
 
void pymqmsgque_ServiceCopy (MQ_SERVICE_COPY_ARGS)
 
OT_ProcRet pymqmsgque_MqContextC_ReadLIST (MqContextC_ARGS)
  Python: [list...] ctx.ReadLIST() C-API
get all arguments as native list …
 
OT_ProcRet pymqmsgque_MqContextC_Send (MqContextC_ARGS)
 

Detailed Description

tag: nhi1-release-250425

Definition in file LibMqMsgque_private_py.h.

Macro Definition Documentation

◆ Send_doc_extra

#define Send_doc_extra   "[…] ctx.Send(\"CALL-SIGNATUR\",call-args …,\"TOKEN-SIGNATURE\",send-args …)"

Definition at line 27 of file LibMqMsgque_private_py.h.

Function Documentation

◆ pymqmsgque_MqContextC_ReadLIST()

OT_ProcRet pymqmsgque_MqContextC_ReadLIST ( MqContextC_ARGS )

Python: [list...] ctx.ReadLIST() C-API
get all arguments as native list …

Definition at line 17 of file MqContextC_ReadLIST_lng.h.

17 {
23 MK_BUF buf = NULL;
24 while (MqReadItemExists(hdl)) {
25 MqReadBUF (hdl, &buf);
26 switch (buf->var.type) {
27 case MK_I8T: { RET = OT_TMP_I8_OBJ(MkBuf2I8(buf)); break; }
28 case MK_BOLT: { RET = OT_TMP_BOL_OBJ(MkBuf2BOL(buf)); break; }
29 case MK_I16T: { RET = OT_TMP_I16_OBJ(MkBuf2I16(buf)); break; }
30 case MK_I32T: { RET = OT_TMP_I32_OBJ(MkBuf2I32(buf)); break; }
31 case MK_FLTT: { RET = OT_TMP_FLT_OBJ(MkBuf2FLT(buf)); break; }
32 case MK_I64T: { RET = OT_TMP_I64_OBJ(MkBuf2I64(buf)); break; }
33 case MK_DBLT: { RET = OT_TMP_DBL_OBJ(MkBuf2DBL(buf)); break; }
34 case MK_BINT: { RET = OT_TMP_BIN_OBJ(buf->storage.first.B,buf->var.cursize); break; }
35 case MK_STRT: { RET = OT_TMP_STR_OBJ(buf->storage.first.C); break; }
36 case MK_LSTT: {
38 MkErrorC_Check(hdl,MkBufferGetBFL (buf, &bfl));
39 OT_MK_CALL_0(bfl,MkBufferListC,ToList,RET);
40 MkRefDecr_X(bfl);
41 break;
42 }
43/*
44 case MQ_ROUT:
45 case MQ_LTRT: {
46 OT_ERROR_TYPE("unable to convert an 'internal' object into a 'public' object");
47 RET = OT_LNG_NULL;
48 }
49*/
50 }
51 if (RET == OT_LNG_NULL) goto error;
53 }
54 goto end;
55 error:
57 end:
59}
#define OT_MK_CALL_0(obj, cls, meth, ret)
#define OT_SETUP_NOARG(d)
#define OT_TMP_DBL_OBJ(val)
#define OT_retObj_SET_Error
#define OT_retObj_SET_List
#define OT_TMP_I16_OBJ(val)
#define OT_TMP_I32_OBJ(val)
#define OT_TMP_I64_OBJ(val)
#define OT_retObj_RETURN
#define OT_TMP_BIN_OBJ(val, len)
#define OT_retObj_APPEND(var)
PyObject * OT_OBJ_T
#define OT_TMP_STR_OBJ(val)
#define OT_TMP_I8_OBJ(val)
#define OT_LNG_NULL
#define OT_TMP_BOL_OBJ(val)
#define OT_CHECK_NOARGS
#define MkErrorC_Check(mng, PROC)
#define OT_TMP_FLT_OBJ(val)
#define OT_SETUP_hdl
#define ReadLIST_doc
#define error
Definition high_lng.h:339
#define MkBuf2I64(buf)
#define MkBuf2BOL(buf)
#define MkBuf2DBL(buf)
#define MkBuf2I8(buf)
#define MkBuf2I16(buf)
#define MkBuf2FLT(buf)
#define MkBuf2I32(buf)
#define MkBufferGetBFL(...)
#define MkBufferListCreate(...)
MK_I8T
MK_I64T
MK_FLTT
MK_BINT
MK_I16T
MK_BOLT
MK_DBLT
MK_I32T
MK_STRT
MK_LSTT
#define MkRefDecr_X(x)
#define MqReadBUF(...)
bool MqReadItemExists(MQ_CTX const ctx)
check if an item exists in the read-data-package …
union MkBufferU first
struct MkBufferS::@5 storage
struct MkBufferS::@4 var
MK_NUM cursize
enum MkTypeE type
MK_STRN C
MK_BIN B

◆ pymqmsgque_MqContextC_Send()

OT_ProcRet pymqmsgque_MqContextC_Send ( MqContextC_ARGS )

◆ pymqmsgque_ServiceCall()

enum MkErrorE pymqmsgque_ServiceCall ( MQ_SERVICE_CALL_ARGS )

Definition at line 28 of file MqCall_py.c.

29{
31
32 PyObject * const callable = (PyObject*) __data__;
33 PyObject * selfarg = OT_SELF_X(mqctx);
34 PyObject * resultO = NULL;
35
36 // test if already deleted
37 if (VAL2CTX(selfarg) == NULL) {
38 return MkErrorSetC_2M(mqctx, "object is NULL");
39 } else if (Py_REFCNT(selfarg) == 0) {
40 return MK_OK;
41 }
42
43// PyThreadState* ts = PyThreadState_Swap(MK_RT_REF.mkThreadData.ptr);
44//printV("ts start: %p → %p", ts, MK_RT_REF.mkThreadData.ptr);
45
46 PyErr_Clear();
47
48 // for methods of the instance 'self' the argument 'self' is already set
49 if (PyMethod_Check(callable)) {
50 PyObject* mself = PyMethod_Self(callable);
51 if (mself == selfarg) {
52 selfarg = NULL;
53 }
54 }
55
56 // call the function
57 resultO = PyObject_CallFunctionObjArgs(callable, selfarg, NULL);
58
59 // no error return OK
60 if (resultO == NULL) goto error;
61
62 Py_CLEAR(resultO);
63 return MkErrorGetCodeI(&MkERROR); /* MkErrorGetCode_0E() */
64
65error:
67
68 return MkErrorStack_0E_Check();
69}
#define OT_SELF_X(x)
#define OT_ERROR_LNG_2_META(m)
#define VAL2CTX(val)
#define mqctx
#define MkErrorGetCodeI(e)
#define MkErrorStack_0E_Check()
#define MkErrorSetC_2M(err, message)
#define MkERROR
MK_OK
#define MQ_SERVICE_CALL_CHECK

◆ pymqmsgque_ServiceCopy()

void pymqmsgque_ServiceCopy ( MQ_SERVICE_COPY_ARGS )

◆ pymqmsgque_ServiceFree()

void pymqmsgque_ServiceFree ( MQ_SERVICE_FREE_ARGS )