This commit is contained in:
blueloveTH 2023-07-02 17:27:46 +08:00
parent c32be30009
commit a50a9324d5
2 changed files with 1 additions and 3 deletions

View File

@ -41,12 +41,9 @@ if(NOT PK_BUILD_EXE AND NOT PK_BUILD_SHARED_LIB AND NOT PK_BUILD_STATIC_LIB)
endif()
if(PK_BUILD_EXE)
message(STATUS "Building executable")
add_executable(${PROJECT_NAME} ${POCKETPY_SRC} src2/main.cpp)
elseif(PK_BUILD_SHARED_LIB)
message(STATUS "Building shared library")
add_library(${PROJECT_NAME} SHARED ${POCKETPY_SRC} src2/lib.cpp)
elseif(PK_BUILD_STATIC_LIB)
message(STATUS "Building static library")
add_library(${PROJECT_NAME} STATIC ${POCKETPY_SRC} src2/lib.cpp)
endif()

View File

@ -967,6 +967,7 @@ PyObject* VM::bind(PyObject* obj, const char* sig, const char* docstring, Native
// fn(a, b, *c, d=1) -> None
co = compile("def " + Str(sig) + " : pass", "<bind>", EXEC_MODE);
}catch(Exception& e){
PK_UNUSED(e);
throw std::runtime_error("invalid signature: " + std::string(sig));
}
if(co->func_decls.size() != 1){