mirror of
https://github.com/janet-lang/janet
synced 2024-12-26 00:10: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) {
|
JanetModule janet_native(const char *name, const uint8_t **error) {
|
||||||
Clib lib = load_clib(name);
|
Clib lib = load_clib(name);
|
||||||
JanetModule init;
|
JanetModule init;
|
||||||
|
JanetModconf getter;
|
||||||
if (!lib) {
|
if (!lib) {
|
||||||
*error = janet_cstring(error_clib());
|
*error = janet_cstring(error_clib());
|
||||||
return NULL;
|
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");
|
*error = janet_cstring("could not find the _janet_init symbol");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
JanetBuildConfig(*modconf_getter)(void) = symbol_clib(lib, "_janet_mod_config");
|
getter = (JanetModconf) symbol_clib(lib, "_janet_mod_config");
|
||||||
if (!modconf_getter) {
|
if (!getter) {
|
||||||
*error = janet_cstring("could not find the _janet_mod_config symbol");
|
*error = janet_cstring("could not find the _janet_mod_config symbol");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
JanetBuildConfig modconf = modconf_getter();
|
JanetBuildConfig modconf = getter();
|
||||||
JanetBuildConfig host = janet_config_current();
|
JanetBuildConfig host = janet_config_current();
|
||||||
if (host.major != modconf.major ||
|
if (host.major != modconf.major ||
|
||||||
host.minor < modconf.minor ||
|
host.minor < modconf.minor ||
|
||||||
|
@ -1216,6 +1216,7 @@ JANET_API void *janet_abstract(const JanetAbstractType *type, size_t size);
|
|||||||
|
|
||||||
/* Native */
|
/* Native */
|
||||||
typedef void (*JanetModule)(JanetTable *);
|
typedef void (*JanetModule)(JanetTable *);
|
||||||
|
typedef JanetBuildConfig(*JanetModconf)(void);
|
||||||
JANET_API JanetModule janet_native(const char *name, const uint8_t **error);
|
JANET_API JanetModule janet_native(const char *name, const uint8_t **error);
|
||||||
|
|
||||||
/* Marshaling */
|
/* Marshaling */
|
||||||
|
Loading…
Reference in New Issue
Block a user