| 7054 | } |
| 7055 | |
| 7056 | static int lua_step_int(char *spname, char **err, struct sqlthdstate *thd, |
| 7057 | struct sqlclntstate *clnt, sqlite3_context *context, |
| 7058 | int argc, sqlite3_value **argv) |
| 7059 | { |
| 7060 | int rc, new_vm; |
| 7061 | if ((rc = setup_sp(spname, thd, clnt, &new_vm, err)) != 0) return rc; |
| 7062 | Lua L = clnt->sp->lua; |
| 7063 | SP sp = clnt->sp; |
| 7064 | if (new_vm) { |
| 7065 | remove_emit(L); |
| 7066 | remove_tran_funcs(L); |
| 7067 | if ((rc = process_src(L, sp->src, err)) != 0) return rc; |
| 7068 | } |
| 7069 | if ((rc = get_func_by_name(L, "step", err)) != 0) return rc; |
| 7070 | if ((rc = sqlite_to_lua(L, clnt->tzname, argc, argv)) != 0) return rc; |
| 7071 | sp->num_instructions = 0; |
| 7072 | return run_func(clnt, argc, err, 0); |
| 7073 | } |
| 7074 | |
| 7075 | static int lua_func_int(char *spname, char **err, struct sqlthdstate *thd, |
| 7076 | struct sqlclntstate *clnt, sqlite3_context *context, |
no test coverage detected