Skip to content

Commit

Permalink
修复sqliteBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
xiyoo0812 committed Apr 19, 2024
1 parent 24eafb2 commit 48b0f42
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions core/quanta/src/mainlib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ QUANTA_API const char* call_quanta(const char* func) {
return "";
}

QUANTA_API void stop_quanta() {
if (q_app) {
delete q_app;
q_app = nullptr;
}
}

QUANTA_API int run_quanta() {
if (q_app) {;
if (!q_app->step()) {
Expand Down
1 change: 1 addition & 0 deletions core/quanta/src/mainlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ extern "C" {
#endif

QUANTA_API int run_quanta();
QUANTA_API void stop_quanta();
QUANTA_API int init_quanta(const char* zfile, const char* fconf);
QUANTA_API const char* call_quanta(const char* func);

Expand Down
2 changes: 1 addition & 1 deletion script/driver/sqlite.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function Sqlite:put(primary_id, data, sheet)
return true
end

function Sqlite:get(sheet, primary_id)
function Sqlite:get(primary_id, sheet)
log_debug("[Sqlite][get] sheet:{} primary_id:{}", sheet, primary_id)
local rc, data = self:get_prepare(sheet).select.run(primary_id)
if rc == SQLITE_NFOUND or rc == SQLITE_DONE then
Expand Down

0 comments on commit 48b0f42

Please sign in to comment.