From 1880ff0fc3f2048f3753e0d65ffbccf0ae35e5ce Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 21 Feb 2008 17:55:06 +0000 Subject: defined some entry points in vmstk --- vmstk.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'vmstk.c') diff --git a/vmstk.c b/vmstk.c index 61825976..1db7b8fa 100644 --- a/vmstk.c +++ b/vmstk.c @@ -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); -- cgit v1.2.3