From 2742414fa71a1131e7205b8a4a92d47a6202f560 Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Mon, 9 Sep 2024 13:31:57 +0800 Subject: [PATCH] ... --- build_dll.sh | 4 ++-- src/public/internal.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build_dll.sh b/build_dll.sh index 0c3110b5..772a07fe 100644 --- a/build_dll.sh +++ b/build_dll.sh @@ -2,5 +2,5 @@ set -e FLAGS="-std=c11 -Iinclude -O0 -Wfatal-errors -g -DDEBUG -DPK_ENABLE_OS=1" -clang $FLAGS -shared -fPIC src2/hello.c -o libhello.dylib -undefined dynamic_lookup - +# link libpocketpy.dylib +clang $FLAGS -shared -fPIC src2/hello.c -o libhello.dylib -L. -lpocketpy diff --git a/src/public/internal.c b/src/public/internal.c index 49e1f305..94efb519 100644 --- a/src/public/internal.c +++ b/src/public/internal.c @@ -20,7 +20,7 @@ static VM pk_default_vm; static VM* pk_all_vm[16]; void py_initialize() { - if(!pk_current_vm){ + if(pk_current_vm){ c11__abort("py_initialize() can only be called once!"); }