diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-21 17:55:06 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-21 17:55:06 +0000 |
commit | 1880ff0fc3f2048f3753e0d65ffbccf0ae35e5ce (patch) | |
tree | 347eb70c727765f731b2cf0e61d88f6f30a1b4df /vmstk.c | |
parent | ac69017509862ba460bd46eaebff290fbe0e2988 (diff) | |
download | rsyslog-1880ff0fc3f2048f3753e0d65ffbccf0ae35e5ce.tar.gz rsyslog-1880ff0fc3f2048f3753e0d65ffbccf0ae35e5ce.tar.xz rsyslog-1880ff0fc3f2048f3753e0d65ffbccf0ae35e5ce.zip |
defined some entry points in vmstk
Diffstat (limited to 'vmstk.c')
-rw-r--r-- | vmstk.c | 32 |
1 files changed, 32 insertions, 0 deletions
@@ -32,6 +32,7 @@ /* static data */ DEFobjStaticHelpers +DEFobjCurrIf(var) /* Standard-Constructor @@ -65,6 +66,34 @@ CODESTARTobjDebugPrint(vmstk) ENDobjDebugPrint(vmstk) +/* push a value on the stack + */ +static rsRetVal +push(vmstk_t *pThis, var_t *pVar) +{ + DEFiRet; + + ISOBJ_TYPE_assert(pThis, vmstk); + ISOBJ_TYPE_assert(pVar, var); + + RETiRet; +} + + +/* pop a value from the stack + */ +static rsRetVal +pop(vmstk_t *pThis, var_t **ppVar) +{ + DEFiRet; + + ISOBJ_TYPE_assert(pThis, vmstk); + assert(ppVar != NULL); + + RETiRet; +} + + /* queryInterface function * rgerhards, 2008-02-21 */ @@ -85,6 +114,8 @@ CODESTARTobjQueryInterface(vmstk) pIf->ConstructFinalize = vmstkConstructFinalize; pIf->Destruct = vmstkDestruct; pIf->DebugPrint = vmstkDebugPrint; + pIf->Push = push; + pIf->Pop = pop; finalize_it: ENDobjQueryInterface(vmstk) @@ -95,6 +126,7 @@ ENDobjQueryInterface(vmstk) */ BEGINObjClassInit(vmstk, 1) /* class, version */ /* request objects we use */ + CHKiRet(objUse(var)); /* set our own handlers */ OBJSetMethodHandler(objMethod_DEBUGPRINT, vmstkDebugPrint); |