mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-22 04:20:17 +00:00
...
This commit is contained in:
parent
c32be30009
commit
a50a9324d5
@ -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()
|
@ -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){
|
||||
|
Loading…
x
Reference in New Issue
Block a user