mirror of
https://github.com/pocketpy/pocketpy
synced 2025-12-06 18:20:17 +00:00
...
This commit is contained in:
parent
35a694ac29
commit
0c2d042020
@ -103,15 +103,7 @@ int main(int argc, char** argv){
|
|||||||
std::filesystem::current_path(filepath.parent_path());
|
std::filesystem::current_path(filepath.parent_path());
|
||||||
|
|
||||||
bool ok = pkpy_exec_2(vm, src.c_str(), filepath.filename().string().c_str(), 0, NULL);
|
bool ok = pkpy_exec_2(vm, src.c_str(), filepath.filename().string().c_str(), 0, NULL);
|
||||||
if(!ok){
|
if(!ok) pkpy_clear_error(vm, NULL);
|
||||||
char* err;
|
|
||||||
if(pkpy_clear_error(vm, &err)){
|
|
||||||
std::cerr << err << std::endl;
|
|
||||||
pkpy_free(err);
|
|
||||||
}else{
|
|
||||||
std::cerr << "Unknown error" << std::endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
pkpy_delete_vm(vm);
|
pkpy_delete_vm(vm);
|
||||||
return ok ? 0 : 1;
|
return ok ? 0 : 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user