mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 19:40:18 +00:00
...
This commit is contained in:
parent
578d6a25cd
commit
93024830cd
@ -30,7 +30,7 @@ static dylib_entry_t load_dylib(const char* path){
|
||||
LocalFree(errorMessage);
|
||||
return nullptr;
|
||||
}
|
||||
return (dylib_entry_t)GetProcAddress(handle, "platform_module__init__");
|
||||
return (dylib_entry_t)GetProcAddress(handle, "pkpy_module__init__");
|
||||
}
|
||||
#elif PK_SUPPORT_DYLIB == 2
|
||||
// linux/darwin
|
||||
@ -40,7 +40,7 @@ static dylib_entry_t load_dylib(const char* path){
|
||||
if(ec) return nullptr;
|
||||
void* handle = dlopen(p.c_str(), RTLD_LAZY);
|
||||
if(!handle) return nullptr;
|
||||
return (dylib_entry_t)dlsym(handle, "platform_module__init__");
|
||||
return (dylib_entry_t)dlsym(handle, "pkpy_module__init__");
|
||||
}
|
||||
|
||||
#elif PK_SUPPORT_DYLIB == 3
|
||||
@ -48,7 +48,7 @@ static dylib_entry_t load_dylib(const char* path){
|
||||
static dylib_entry_t load_dylib(const char* path){
|
||||
void* handle = dlopen(path, RTLD_LAZY);
|
||||
if(!handle) return nullptr;
|
||||
return (dylib_entry_t)dlsym(handle, "platform_module__init__");
|
||||
return (dylib_entry_t)dlsym(handle, "pkpy_module__init__");
|
||||
}
|
||||
|
||||
#else
|
||||
|
@ -8,7 +8,7 @@ static int hello(pkpy_vm* vm){
|
||||
}
|
||||
|
||||
PK_EXPORT
|
||||
const char* platform_module__init__(pkpy_vm* vm, const char* version){
|
||||
const char* pkpy_module__init__(pkpy_vm* vm, const char* version){
|
||||
printf("version: %s\n", version);
|
||||
pkpy_push_function(vm, "hello()", hello);
|
||||
pkpy_push_module(vm, "test");
|
||||
|
Loading…
x
Reference in New Issue
Block a user