theKernel 10.0
Loading...
Searching...
No Matches
MkRuntimeC_py.c File Reference

tag: nhi1-release-250425 More...

+ Include dependency graph for MkRuntimeC_py.c:

Go to the source code of this file.

Macros

#define META_FILE_NAME   "MkRuntimeC_py.c"
 
#define OT_CLASS   (&NS(MkRuntimeCR))
 
#define OT_CLASS_NAME   "MkRuntimeC"
 
#define OT_LNG2META(O)
 
#define OT_retObj_CONSTR(mng)
 
#define OT_SETUP_hdl   OT_SETUP_hdl_tmpl(MkRuntimeC)
 
#define OT_SETUP_hdl__null_allow   OT_SETUP_hdl_tmpl__null_allow(MkRuntimeC)
 
#define OT_SETUP_hdl_constr
 
#define OT_SETUP_hdl_destr   OT_SETUP_hdl_tmpl__null_allow(MkRuntimeC)
 
#define OT_SETUP_hdl_static
 
#define OT_SETUP_hdl_static_constr   OT_SETUP_hdl_static
 
#define SetupRtFromObj_X(hdl)
 
#define SetupRtFromObj_XN(hdl)
 
#define MkRuntimeCTT   MK(MkKernelThreadState).MkRuntimeCTT
 
#define ClassInit
 
#define META_CONTEXT_S   MK_ERROR_DEFAULT
 
#define DebugGet_doc   "int32 MkRuntimeC.DebugGet()"
 
#define DebugSet_doc   "MkRuntimeC.DebugSet(dbg:int32)"
 
#define ErrorGetCode_doc   "MkErrorE MkRuntimeC.ErrorGetCode()"
 
#define IsSilentGet_doc   "bool MkRuntimeC.IsSilentGet()"
 
#define IsSilentSet_doc   "MkRuntimeC.IsSilentSet(silent:bool)"
 
#define Log0_doc   "MkRuntimeC.Log0(?fmtobj:MkObjectC=None?, ?debug:int32=0?, ?callfunc:string=\"MK_NULL\"?, ?lvl:int32=0?) (const)"
 
#define LogTargetGet_doc   "string MkRuntimeC.LogTargetGet()"
 
#define LogTargetReset_doc   "MkRuntimeC.LogTargetReset()"
 
#define LogTargetSet_doc   "MkRuntimeC.LogTargetSet(logTgt:string)"
 
#define NoDecoSet_doc   "MkRuntimeC.NoDecoSet(noDeco:bool)"
 

Functions

static OT_OBJ_T pymkkernel_MkRuntimeC_CTOR (MK_RT mkrt, OT_CLS_T type, MK_RT hdl)
 
static MK_PTR pymkkernel_MkRuntimeC_selfCreate (MK_RT mkrt, MK_OBJ const obj, MK_PTR const env)
 
static void pymkkernel_MkRuntimeC_selfDelete (MK_RT mkrt, MK_PTR self, MK_PTR const env)
 
static void pymkkernel_MkRuntimeC_selfUnlink (MK_RT mkrt, MK_PTR self, MK_PTR const env)
 
static OT_ProcRet pymkkernel_MkRuntimeC_DebugGet (OtClass_ARGS)
  Python: [static] int32 MkRuntimeC.DebugGet() C-API
get the MkRuntimeS::debug value …
 
static OT_ProcRet pymkkernel_MkRuntimeC_DebugSet (OtClass_ARGS)
  Python: [static] MkRuntimeC.DebugSet(dbg:int32) C-API
set the MkRuntimeS::debug value …
 
static OT_ProcRet pymkkernel_MkRuntimeC_ErrorGetCode (OtClass_ARGS)
  Python: [static] MkErrorE MkRuntimeC.ErrorGetCode() C-API
return MkErrorS::code from a given MkRuntimeC
 
static OT_ProcRet pymkkernel_MkRuntimeC_IsSilentGet (OtClass_ARGS)
  Python: [static] bool MkRuntimeC.IsSilentGet() C-API
get the MkRuntimeS::isSilent value …
 
static OT_ProcRet pymkkernel_MkRuntimeC_IsSilentSet (OtClass_ARGS)
  Python: [static] MkRuntimeC.IsSilentSet(silent:bool) C-API
set the MkRuntimeS::isSilent value …
 
static OT_ProcRet pymkkernel_MkRuntimeC_LogTargetGet (OtClass_ARGS)
  Python: [static] string MkRuntimeC.LogTargetGet() C-API
get the MkLogDataS::logNAME value …
 
static OT_ProcRet pymkkernel_MkRuntimeC_LogTargetReset (OtClass_ARGS)
  Python: [static] MkRuntimeC.LogTargetReset() C-API
set the MkRuntimeS::log value to the DEFAULT value …
 
static OT_ProcRet pymkkernel_MkRuntimeC_LogTargetSet (OtClass_ARGS)
  Python: [static] MkRuntimeC.LogTargetSet(logTgt:string) C-API
set the MkRuntimeS::log value and cleanup old value …
 
static OT_ProcRet pymkkernel_MkRuntimeC_NoDecoSet (OtClass_ARGS)
  Python: [static] MkRuntimeC.NoDecoSet(noDeco:bool) C-API
set the MkRuntimeS::noDeco value …
 
static OT_ProcRet pymkkernel_MkRuntimeC_Log0 (OtClass_ARGS)
  Python: [static] MkRuntimeC.Log0(?fmtobj:MkObjectC=None?, ?debug:int32=0?, ?callfunc:string="MK_NULL"?, ?lvl:int32=0?) C-API
log the MkRuntimeC
 
int pymkkernel_pMkRuntimeC_Init (MK_RT mkrt, PyObject *m)
 

Variables

static PyMethodDef MkRuntimeC_Methods []
 
OT_CLASS_TYPE_REF pymkkernel_MkRuntimeCR
 

Detailed Description

tag: nhi1-release-250425

Definition in file MkRuntimeC_py.c.

Macro Definition Documentation

◆ ClassInit

#define ClassInit
Value:
/* if not already done, initialize NEW META type */ \
\
/* protect against double call */ \
if (MkRuntimeCTT->selfCreate == NS(MkRuntimeC_selfCreate)) return MK_OK; \
\
/* add "selfCreate" and "selfDelete" feature to the META-Class */ \
MkRuntimeCTT->selfCreate = NS(MkRuntimeC_selfCreate); \
MkRuntimeCTT->selfDelete = NS(MkRuntimeC_selfDelete); \
MkRuntimeCTT->selfUnlink = NS(MkRuntimeC_selfUnlink); \
\
if (!PyType_HasFeature(OT_CLASS,Py_TPFLAGS_READY)) { \
NS(MkRuntimeCR).tp_base = MkRuntimeC_base; \
OtErrorCheckLng (PyType_Ready(OT_CLASS)); \
} \
OtErrorCheckLng(PyModule_AddObjectRef(m, "MkRuntimeC", (PyObject *)OT_CLASS)); \
\
/* define the "NULL" object */ \
MkRuntimeC_MK_NULL = Py_NewRef(MK(AtomCreate) (MK_RT_CALL OT_CLASS, NULL /*obj*/));
#define MK(n)
#define NS(n)
#define MkRuntimeC_MK_NULL
#define MkRuntimeC_base
#define MkRuntimeCTT
#define OT_CLASS
@ MK_OK
(persistent) everything is OK.
#define MkRuntimeSTT
instance-type as MkTypeS-class-type (cast from MkRuntimeST into MkTypeS) …
#define MK_RT_CALL
The MkRuntimeS provide a per-thread environment for pymkkernel …

Definition at line 65 of file MkRuntimeC_py.c.

65#define ClassInit \
66 /* if not already done, initialize NEW META type */ \
67 if (MkRuntimeCTT == NULL) MkRuntimeCTT = MkRuntimeSTT; \
68 \
69 /* protect against double call */ \
70 if (MkRuntimeCTT->selfCreate == NS(MkRuntimeC_selfCreate)) return MK_OK; \
71 \
72 /* add "selfCreate" and "selfDelete" feature to the META-Class */ \
73 MkRuntimeCTT->selfCreate = NS(MkRuntimeC_selfCreate); \
74 MkRuntimeCTT->selfDelete = NS(MkRuntimeC_selfDelete); \
75 MkRuntimeCTT->selfUnlink = NS(MkRuntimeC_selfUnlink); \
76 \
77 if (!PyType_HasFeature(OT_CLASS,Py_TPFLAGS_READY)) { \
78 NS(MkRuntimeCR).tp_base = MkRuntimeC_base; \
79 OtErrorCheckLng (PyType_Ready(OT_CLASS)); \
80 } \
81 OtErrorCheckLng(PyModule_AddObjectRef(m, "MkRuntimeC", (PyObject *)OT_CLASS)); \
82 \
83 /* define the "NULL" object */ \
84 MkRuntimeC_MK_NULL = Py_NewRef(MK(AtomCreate) (MK_RT_CALL OT_CLASS, NULL /*obj*/));

◆ DebugGet_doc

#define DebugGet_doc   "int32 MkRuntimeC.DebugGet()"

doc definition

Definition at line 99 of file MkRuntimeC_py.c.

◆ DebugSet_doc

#define DebugSet_doc   "MkRuntimeC.DebugSet(dbg:int32)"

Definition at line 100 of file MkRuntimeC_py.c.

◆ ErrorGetCode_doc

#define ErrorGetCode_doc   "MkErrorE MkRuntimeC.ErrorGetCode()"

Definition at line 101 of file MkRuntimeC_py.c.

◆ IsSilentGet_doc

#define IsSilentGet_doc   "bool MkRuntimeC.IsSilentGet()"

Definition at line 102 of file MkRuntimeC_py.c.

◆ IsSilentSet_doc

#define IsSilentSet_doc   "MkRuntimeC.IsSilentSet(silent:bool)"

Definition at line 103 of file MkRuntimeC_py.c.

◆ Log0_doc

#define Log0_doc   "MkRuntimeC.Log0(?fmtobj:MkObjectC=None?, ?debug:int32=0?, ?callfunc:string=\"MK_NULL\"?, ?lvl:int32=0?) (const)"

Definition at line 104 of file MkRuntimeC_py.c.

◆ LogTargetGet_doc

#define LogTargetGet_doc   "string MkRuntimeC.LogTargetGet()"

Definition at line 105 of file MkRuntimeC_py.c.

◆ LogTargetReset_doc

#define LogTargetReset_doc   "MkRuntimeC.LogTargetReset()"

Definition at line 106 of file MkRuntimeC_py.c.

◆ LogTargetSet_doc

#define LogTargetSet_doc   "MkRuntimeC.LogTargetSet(logTgt:string)"

Definition at line 107 of file MkRuntimeC_py.c.

◆ META_CONTEXT_S

#define META_CONTEXT_S   MK_ERROR_DEFAULT

Definition at line 88 of file MkRuntimeC_py.c.

◆ META_FILE_NAME

#define META_FILE_NAME   "MkRuntimeC_py.c"

Definition at line 11 of file MkRuntimeC_py.c.

◆ MkRuntimeCTT

#define MkRuntimeCTT   MK(MkKernelThreadState).MkRuntimeCTT

Definition at line 40 of file MkRuntimeC_py.c.

◆ NoDecoSet_doc

#define NoDecoSet_doc   "MkRuntimeC.NoDecoSet(noDeco:bool)"

Definition at line 108 of file MkRuntimeC_py.c.

◆ OT_CLASS

#define OT_CLASS   (&NS(MkRuntimeCR))

Definition at line 16 of file MkRuntimeC_py.c.

◆ OT_CLASS_NAME

#define OT_CLASS_NAME   "MkRuntimeC"

Definition at line 17 of file MkRuntimeC_py.c.

◆ OT_LNG2META

#define OT_LNG2META ( O)
Value:
#define VAL2MNG(val)
static MK_RT MkRt(MK_MNG mng)
cast a unknown-object into an MkRuntimeS pointer or NULL if not possible

Definition at line 19 of file MkRuntimeC_py.c.

◆ OT_retObj_CONSTR

#define OT_retObj_CONSTR ( mng)
Value:
OT_retObj_SET(NS(MkRuntimeC_CTOR)(MK_RT_CALL (PyTypeObject*)class,mng))
#define OT_retObj_SET(val)

Definition at line 21 of file MkRuntimeC_py.c.

◆ OT_SETUP_hdl

#define OT_SETUP_hdl   OT_SETUP_hdl_tmpl(MkRuntimeC)

Definition at line 23 of file MkRuntimeC_py.c.

◆ OT_SETUP_hdl__null_allow

#define OT_SETUP_hdl__null_allow   OT_SETUP_hdl_tmpl__null_allow(MkRuntimeC)

Definition at line 24 of file MkRuntimeC_py.c.

◆ OT_SETUP_hdl_constr

#define OT_SETUP_hdl_constr
Value:
MK_RT hdl = (MK_RT) OT_CLASS;
struct MkRuntimeS * MK_RT
class-shortcut for struct MkRuntimeS *, all shortcut using the XX_YYY syntax (only for public API) …
#define AllRtSetup_NULL
#define MK_RT_UNUSED

Definition at line 25 of file MkRuntimeC_py.c.

25#define OT_SETUP_hdl_constr MK_RT_UNUSED AllRtSetup_NULL; \
26 MK_RT hdl = (MK_RT) OT_CLASS;

◆ OT_SETUP_hdl_destr

#define OT_SETUP_hdl_destr   OT_SETUP_hdl_tmpl__null_allow(MkRuntimeC)

Definition at line 27 of file MkRuntimeC_py.c.

◆ OT_SETUP_hdl_static

#define OT_SETUP_hdl_static
Value:
__attribute__((unused)) MK_TYP hdl = MkRuntimeC##_TT;
MkTypeS - class known as typ or type is used as class-base for a Managed-Object-Technology (MOT) type...

Definition at line 28 of file MkRuntimeC_py.c.

28#define OT_SETUP_hdl_static MK_RT_UNUSED AllRtSetup_NULL; \
29 __attribute__((unused)) MK_TYP hdl = MkRuntimeC##_TT;

◆ OT_SETUP_hdl_static_constr

#define OT_SETUP_hdl_static_constr   OT_SETUP_hdl_static

Definition at line 31 of file MkRuntimeC_py.c.

◆ SetupRtFromObj_X

#define SetupRtFromObj_X ( hdl)
Value:
#define AllRtSetup_X(x)

Definition at line 34 of file MkRuntimeC_py.c.

◆ SetupRtFromObj_XN

#define SetupRtFromObj_XN ( hdl)
Value:
#define AllRtSetup_XN(x)

Definition at line 35 of file MkRuntimeC_py.c.

Function Documentation

◆ pymkkernel_MkRuntimeC_CTOR()

static OT_OBJ_T pymkkernel_MkRuntimeC_CTOR ( MK_RT mkrt,
OT_CLS_T type,
MK_RT hdl )
inlinestatic

Definition at line 44 of file MkRuntimeC_py.c.

44 {
45 return MK(AtomCreate)(MK_RT_CALL type,MkRuntimeC_X2obj(hdl));
46}
#define MkRuntimeC_X2obj(x)

◆ pymkkernel_MkRuntimeC_selfCreate()

static MK_PTR pymkkernel_MkRuntimeC_selfCreate ( MK_RT mkrt,
MK_OBJ const obj,
MK_PTR const env )
static

Definition at line 51 of file MkRuntimeC_py.c.

51 {
52 return MK(AtomCreate) (MK_RT_CALL OT_CLASS,obj);
53}

◆ pymkkernel_MkRuntimeC_selfDelete()

static void pymkkernel_MkRuntimeC_selfDelete ( MK_RT mkrt,
MK_PTR self,
MK_PTR const env )
static

Definition at line 55 of file MkRuntimeC_py.c.

55 {
56 MK(AtomDeleteHard) (MK_RT_CALL OT_SELF);
57}
#define OT_SELF

◆ pymkkernel_MkRuntimeC_selfUnlink()

static void pymkkernel_MkRuntimeC_selfUnlink ( MK_RT mkrt,
MK_PTR self,
MK_PTR const env )
static

Definition at line 59 of file MkRuntimeC_py.c.

59 {
60 MkObjectC_Obj *selfO = (MkObjectC_Obj*) self;
61 selfO->hdl = NULL;
62}
PyObject_HEAD MK_OBJ hdl

◆ pymkkernel_pMkRuntimeC_Init()

int pymkkernel_pMkRuntimeC_Init ( MK_RT mkrt,
PyObject * m )

Definition at line 352 of file MkRuntimeC_py.c.

353{
355
356 return 0;
357error:
358 return -1;
359}
#define ClassInit

Variable Documentation

◆ MkRuntimeC_Methods

PyMethodDef MkRuntimeC_Methods[]
static
Initial value:
= {
{ "DebugGet" , (PyCFunction) pymkkernel_MkRuntimeC_DebugGet , METH_NOARGS|METH_CLASS , DebugGet_doc },
{ "DebugSet" , (PyCFunction) pymkkernel_MkRuntimeC_DebugSet , METH_O|METH_CLASS , DebugSet_doc },
{ "ErrorGetCode" , (PyCFunction) pymkkernel_MkRuntimeC_ErrorGetCode , METH_NOARGS|METH_CLASS , ErrorGetCode_doc },
{ "IsSilentGet" , (PyCFunction) pymkkernel_MkRuntimeC_IsSilentGet , METH_NOARGS|METH_CLASS , IsSilentGet_doc },
{ "IsSilentSet" , (PyCFunction) pymkkernel_MkRuntimeC_IsSilentSet , METH_O|METH_CLASS , IsSilentSet_doc },
{ "Log0" , (PyCFunction) pymkkernel_MkRuntimeC_Log0 , METH_VARARGS|METH_CLASS , Log0_doc },
{ "LogTargetGet" , (PyCFunction) pymkkernel_MkRuntimeC_LogTargetGet , METH_NOARGS|METH_CLASS , LogTargetGet_doc },
{ "LogTargetReset" , (PyCFunction) pymkkernel_MkRuntimeC_LogTargetReset , METH_NOARGS|METH_CLASS , LogTargetReset_doc },
{ "LogTargetSet" , (PyCFunction) pymkkernel_MkRuntimeC_LogTargetSet , METH_O|METH_CLASS , LogTargetSet_doc },
{ "NoDecoSet" , (PyCFunction) pymkkernel_MkRuntimeC_NoDecoSet , METH_O|METH_CLASS , NoDecoSet_doc },
{NULL, NULL, 0, NULL}
}
#define ErrorGetCode_doc
#define Log0_doc
#define IsSilentGet_doc
#define IsSilentSet_doc
#define NoDecoSet_doc
#define LogTargetReset_doc
#define DebugGet_doc
#define DebugSet_doc
#define LogTargetGet_doc
#define LogTargetSet_doc
static OT_ProcRet pymkkernel_MkRuntimeC_LogTargetGet(OtClass_ARGS)
Python: [static] string MkRuntimeC.LogTargetGet() → C-API get the MkLogDataS::logNAME value …
static OT_ProcRet pymkkernel_MkRuntimeC_NoDecoSet(OtClass_ARGS)
Python: [static] MkRuntimeC.NoDecoSet(noDeco:bool) → C-API set the MkRuntimeS::noDeco value …
static OT_ProcRet pymkkernel_MkRuntimeC_ErrorGetCode(OtClass_ARGS)
Python: [static] MkErrorE MkRuntimeC.ErrorGetCode() → C-API return MkErrorS::code from a given M...
static OT_ProcRet pymkkernel_MkRuntimeC_IsSilentSet(OtClass_ARGS)
Python: [static] MkRuntimeC.IsSilentSet(silent:bool) → C-API set the MkRuntimeS::isSilent value ...
static OT_ProcRet pymkkernel_MkRuntimeC_LogTargetSet(OtClass_ARGS)
Python: [static] MkRuntimeC.LogTargetSet(logTgt:string) → C-API set the MkRuntimeS::log value an...
static OT_ProcRet pymkkernel_MkRuntimeC_DebugGet(OtClass_ARGS)
Python: [static] int32 MkRuntimeC.DebugGet() → C-API get the MkRuntimeS::debug value …
static OT_ProcRet pymkkernel_MkRuntimeC_DebugSet(OtClass_ARGS)
Python: [static] MkRuntimeC.DebugSet(dbg:int32) → C-API set the MkRuntimeS::debug value …
static OT_ProcRet pymkkernel_MkRuntimeC_LogTargetReset(OtClass_ARGS)
Python: [static] MkRuntimeC.LogTargetReset() → C-API set the MkRuntimeS::log value to the DEFAUL...
static OT_ProcRet pymkkernel_MkRuntimeC_IsSilentGet(OtClass_ARGS)
Python: [static] bool MkRuntimeC.IsSilentGet() → C-API get the MkRuntimeS::isSilent value …
static OT_ProcRet pymkkernel_MkRuntimeC_Log0(OtClass_ARGS)
Python: [static] MkRuntimeC.Log0(?fmtobj:MkObjectC=None?, ?debug:int32=0?, ?callfunc:string="MK_NULL"...

Type definition

Definition at line 309 of file MkRuntimeC_py.c.

309 {
310
311 // BEGIN-CLASS - created by 'py_MqS.tcl -i NHI1_HOME/theKernel/c/gen/c_mkkernel.meta' - DO NOT change
312
313 // doc-key: MkRuntimeC,MkRuntime,sm_
314 { "DebugGet" , (PyCFunction) NS(MkRuntimeC_DebugGet) , METH_NOARGS|METH_CLASS , DebugGet_doc },
315 { "DebugSet" , (PyCFunction) NS(MkRuntimeC_DebugSet) , METH_O|METH_CLASS , DebugSet_doc },
316 { "ErrorGetCode" , (PyCFunction) NS(MkRuntimeC_ErrorGetCode) , METH_NOARGS|METH_CLASS , ErrorGetCode_doc },
317 { "IsSilentGet" , (PyCFunction) NS(MkRuntimeC_IsSilentGet) , METH_NOARGS|METH_CLASS , IsSilentGet_doc },
318 { "IsSilentSet" , (PyCFunction) NS(MkRuntimeC_IsSilentSet) , METH_O|METH_CLASS , IsSilentSet_doc },
319 { "Log0" , (PyCFunction) NS(MkRuntimeC_Log0) , METH_VARARGS|METH_CLASS , Log0_doc },
320 { "LogTargetGet" , (PyCFunction) NS(MkRuntimeC_LogTargetGet) , METH_NOARGS|METH_CLASS , LogTargetGet_doc },
321 { "LogTargetReset" , (PyCFunction) NS(MkRuntimeC_LogTargetReset) , METH_NOARGS|METH_CLASS , LogTargetReset_doc },
322 { "LogTargetSet" , (PyCFunction) NS(MkRuntimeC_LogTargetSet) , METH_O|METH_CLASS , LogTargetSet_doc },
323 { "NoDecoSet" , (PyCFunction) NS(MkRuntimeC_NoDecoSet) , METH_O|METH_CLASS , NoDecoSet_doc },
324
325 // END-CLASS - created by 'py_MqS.tcl -i NHI1_HOME/theKernel/c/gen/c_mkkernel.meta' - DO NOT change
326
327 // BEGIN-OBJ - created by 'py_MqS.tcl -i NHI1_HOME/theKernel/c/gen/c_mkkernel.meta' - DO NOT change
328
329 // → no data
330
331 // END-OBJ - created by 'py_MqS.tcl -i NHI1_HOME/theKernel/c/gen/c_mkkernel.meta' - DO NOT change
332
333 {NULL, NULL, 0, NULL} /* Sentinel */
334};

◆ pymkkernel_MkRuntimeCR

OT_CLASS_TYPE_REF pymkkernel_MkRuntimeCR
Initial value:
= {
PyVarObject_HEAD_INIT(NULL, 0)
.tp_name = "pymkkernel.MkRuntimeC",
.tp_doc = "PyMkKernel MkRuntimeC Type",
.tp_basicsize = sizeof(MkRuntimeC_Obj),
.tp_itemsize = 0,
.tp_flags = Py_TPFLAGS_DEFAULT,
.tp_methods = MkRuntimeC_Methods,
.tp_base = NULL
}
struct MkRuntimeC_Obj MkRuntimeC_Obj
static PyMethodDef MkRuntimeC_Methods[]

Public API

Definition at line 341 of file MkRuntimeC_py.c.

341 {
342 PyVarObject_HEAD_INIT(NULL, 0)
343 .tp_name = "pymkkernel.MkRuntimeC",
344 .tp_doc = "PyMkKernel MkRuntimeC Type",
345 .tp_basicsize = sizeof(MkRuntimeC_Obj),
346 .tp_itemsize = 0,
347 .tp_flags = Py_TPFLAGS_DEFAULT,
348 .tp_methods = MkRuntimeC_Methods,
349 .tp_base = NULL
350};