| 7073 | } |
| 7074 | |
| 7075 | static int lua_func_int(char *spname, char **err, struct sqlthdstate *thd, |
| 7076 | struct sqlclntstate *clnt, sqlite3_context *context, |
| 7077 | int argc, sqlite3_value **argv) |
| 7078 | { |
| 7079 | int rc, new_vm; |
| 7080 | if ((rc = setup_sp(spname, thd, clnt, &new_vm, err)) != 0) return rc; |
| 7081 | Lua L = clnt->sp->lua; |
| 7082 | SP sp = clnt->sp; |
| 7083 | remove_emit(L); |
| 7084 | remove_tran_funcs(L); |
| 7085 | if ((rc = process_src(L, sp->src, err)) != 0) return rc; |
| 7086 | if ((rc = get_func_by_name(L, spname, err)) != 0) return rc; |
| 7087 | if ((rc = sqlite_to_lua(L, clnt->tzname, argc, argv)) != 0) return rc; |
| 7088 | sp->num_instructions = 0; |
| 7089 | return run_func(clnt, argc, err, 1); |
| 7090 | } |
| 7091 | |
| 7092 | static int exec_thread_int(struct sqlthdstate *thd, struct sqlclntstate *clnt) |
| 7093 | { |
no test coverage detected