aboutsummaryrefslogtreecommitdiffstats
path: root/stack.c
diff options
context:
space:
mode:
Diffstat (limited to 'stack.c')
-rw-r--r--stack.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/stack.c b/stack.c
deleted file mode 100644
index 8ada8ea..0000000
--- a/stack.c
+++ /dev/null
@@ -1,38 +0,0 @@
-#include "stack.h"
-
-void ipush(interpreter *it, void *v)
-{
- it->stack[it->stidx++] = v;
-}
-
-void *ipop(interpreter *it)
-{
- return it->stack[--it->stidx];
-}
-
-void ipopm(interpreter *it, uint32_t count)
-{
- it->stidx -= count;
-}
-
-variable *igetarg(interpreter *interp, uint32_t index)
-{
- return interp->stack[interp->stidx - index - 1];
-}
-
-const char *igetarg_string(interpreter *interp, uint32_t index)
-{
- if (index >= interp->stidx)
- return 0;
- variable *v = igetarg(interp, index);
- return (const char *)v->value.p;
-}
-
-float igetarg_number(interpreter *interp, uint32_t index)
-{
- if (index >= interp->stidx)
- return 0;
- variable *v = igetarg(interp, index);
- return v->value.f;
-}
-