mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
...
This commit is contained in:
parent
1bd443107b
commit
31ae76c175
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@ -26,7 +26,7 @@ jobs:
|
|||||||
- name: Benchmark
|
- name: Benchmark
|
||||||
run: python3 scripts/run_tests.py benchmark
|
run: python3 scripts/run_tests.py benchmark
|
||||||
build_linux:
|
build_linux:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Setup Clang
|
- name: Setup Clang
|
||||||
|
@ -2,8 +2,11 @@
|
|||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
#if __has_include("pocketpy_c.h")
|
||||||
#include "pocketpy_c.h"
|
#include "pocketpy_c.h"
|
||||||
|
#else
|
||||||
|
#include "pocketpy.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
||||||
@ -87,10 +90,9 @@ int main(int argc, char** argv){
|
|||||||
// set parent path as cwd
|
// set parent path as cwd
|
||||||
std::filesystem::current_path(filepath.parent_path());
|
std::filesystem::current_path(filepath.parent_path());
|
||||||
|
|
||||||
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);
|
||||||
pkpy_delete_vm(vm);
|
pkpy_delete_vm(vm);
|
||||||
// return ret != nullptr ? 0 : 1;
|
return ok ? 0 : 1;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
__HELP:
|
__HELP:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user