an addition operator, of sorts

This commit is contained in:
Stephen committed 2012-08-16 01:16:08 +01:00
1 parent 2002dc1a2f
commit fd738bface
4 files changed
+40 -2

No files matched your search

+14
View File
@@ -340,6 +340,20 @@ json_t* jq_next() {
stack_push(stackval_replace(top, cfunc_output[0]));
break;
}
case CALL_BUILTIN_3_1: {
stackval top = stack_pop();
json_t* a = stack_pop().value;
json_t* b = stack_pop().value;
cfunc_input[0] = top.value;
cfunc_input[1] = a;
cfunc_input[2] = b;
struct cfunction* func = &bc->globals->cfunctions[*pc++];
printf(" call %s\n", func->name);
func->fptr(cfunc_input, cfunc_output);
stack_push(stackval_replace(top, cfunc_output[0]));
break;
}
}