summaryrefslogtreecommitdiffstats
path: root/execute.c
diff options
context:
space:
mode:
authorStephen Dolan <mu@netsoc.tcd.ie>2012-12-02 22:12:08 +0000
committerStephen Dolan <mu@netsoc.tcd.ie>2012-12-02 22:12:08 +0000
commitea9db414edd078d8cb5e95a7694df7ae81d6daac (patch)
treec7b349f64d1d648256d4fab1ec50b6b018d7f983 /execute.c
parentb6f2fbbe62be72e7eb52fda9f5ca5a8838869ae4 (diff)
Clean up implementation of builtin functions.
Diffstat (limited to 'execute.c')
-rw-r--r--execute.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/execute.c b/execute.c
index 8c56b67c..8fadc7e7 100644
--- a/execute.c
+++ b/execute.c
@@ -149,7 +149,6 @@ void print_error(jv value) {
jv jq_next() {
jv cfunc_input[MAX_CFUNCTION_ARGS];
- jv cfunc_output[MAX_CFUNCTION_ARGS];
assert(!forkable_stack_empty(&frame_stk));
uint16_t* pc = *frame_current_retaddr(&frame_stk);
@@ -419,8 +418,7 @@ jv jq_next() {
cfunc_input[i] = stack_pop().value;
}
struct cfunction* func = &frame_current_bytecode(&frame_stk)->globals->cfunctions[*pc++];
- func->fptr(cfunc_input, cfunc_output);
- top.value = cfunc_output[0];
+ top.value = cfunction_invoke(func, cfunc_input);
if (jv_is_valid(top.value)) {
stack_push(top);
} else {