mirror of
https://github.com/janet-lang/janet
synced 2024-12-25 07:50:27 +00:00
Appease MSVC.
This commit is contained in:
parent
1b63215aad
commit
c8cf7c2445
@ -57,6 +57,7 @@ typedef void *Clib;
|
||||
JanetModule janet_native(const char *name, const uint8_t **error) {
|
||||
Clib lib = load_clib(name);
|
||||
JanetModule init;
|
||||
JanetModconf getter;
|
||||
if (!lib) {
|
||||
*error = janet_cstring(error_clib());
|
||||
return NULL;
|
||||
@ -66,12 +67,12 @@ JanetModule janet_native(const char *name, const uint8_t **error) {
|
||||
*error = janet_cstring("could not find the _janet_init symbol");
|
||||
return NULL;
|
||||
}
|
||||
JanetBuildConfig(*modconf_getter)(void) = symbol_clib(lib, "_janet_mod_config");
|
||||
if (!modconf_getter) {
|
||||
getter = (JanetModconf) symbol_clib(lib, "_janet_mod_config");
|
||||
if (!getter) {
|
||||
*error = janet_cstring("could not find the _janet_mod_config symbol");
|
||||
return NULL;
|
||||
}
|
||||
JanetBuildConfig modconf = modconf_getter();
|
||||
JanetBuildConfig modconf = getter();
|
||||
JanetBuildConfig host = janet_config_current();
|
||||
if (host.major != modconf.major ||
|
||||
host.minor < modconf.minor ||
|
||||
|
@ -1216,6 +1216,7 @@ JANET_API void *janet_abstract(const JanetAbstractType *type, size_t size);
|
||||
|
||||
/* Native */
|
||||
typedef void (*JanetModule)(JanetTable *);
|
||||
typedef JanetBuildConfig(*JanetModconf)(void);
|
||||
JANET_API JanetModule janet_native(const char *name, const uint8_t **error);
|
||||
|
||||
/* Marshaling */
|
||||
|
Loading…
Reference in New Issue
Block a user