🔥 move NASAL_EXPORT to nasal.h
This commit is contained in:
parent
1b745ad176
commit
dea19fe3c3
|
@ -124,7 +124,7 @@ module_func_info func_tbl[] = {
|
|||
|
||||
}
|
||||
|
||||
NASAL_EXTERN module_func_info* get() {
|
||||
NASAL_EXPORT module_func_info* get() {
|
||||
return fib_module::func_tbl;
|
||||
}
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@ module_func_info func_tbl[] = {
|
|||
{nullptr, nullptr}
|
||||
};
|
||||
|
||||
NASAL_EXTERN module_func_info* get() {
|
||||
NASAL_EXPORT module_func_info* get() {
|
||||
return func_tbl;
|
||||
}
|
||||
|
||||
|
|
|
@ -295,7 +295,7 @@ module_func_info func_tbl[] = {
|
|||
{nullptr, nullptr}
|
||||
};
|
||||
|
||||
NASAL_EXTERN module_func_info* get() {
|
||||
NASAL_EXPORT module_func_info* get() {
|
||||
return func_tbl;
|
||||
}
|
||||
|
||||
|
|
|
@ -262,7 +262,7 @@ module_func_info func_tbl[] = {
|
|||
{nullptr, nullptr}
|
||||
};
|
||||
|
||||
NASAL_EXTERN module_func_info* get() {
|
||||
NASAL_EXPORT module_func_info* get() {
|
||||
return func_tbl;
|
||||
}
|
||||
|
||||
|
|
10
src/nasal.h
10
src/nasal.h
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#ifndef __nasver__
|
||||
#define __nasver__ "11.3"
|
||||
#define __nasver__ "11.3.1"
|
||||
#endif
|
||||
|
||||
#include <cstddef>
|
||||
|
@ -19,3 +19,11 @@ using f64 = double;
|
|||
|
||||
// virtual machine stack depth, both global depth and value stack depth
|
||||
const u32 VM_STACK_DEPTH = UINT16_MAX;
|
||||
|
||||
// avoid error loading function bug in MSVC version nasal.exe
|
||||
#ifdef _MSC_VER
|
||||
// and fuck MSVC again
|
||||
#define NASAL_EXPORT extern "C" __declspec(dllexport)
|
||||
#else
|
||||
#define NASAL_EXPORT extern "C" __attribute__((visibility("default")))
|
||||
#endif
|
||||
|
|
|
@ -126,13 +126,4 @@ struct module_func_info {
|
|||
// module function "get" type
|
||||
typedef module_func_info* (*get_func_ptr)();
|
||||
|
||||
|
||||
// avoid error loading function bug in MSVC version nasal.exe
|
||||
#ifdef _MSC_VER
|
||||
// and fuck MSVC again
|
||||
#define NASAL_EXTERN extern "C" __declspec(dllexport)
|
||||
#else
|
||||
#define NASAL_EXTERN extern "C"
|
||||
#endif
|
||||
|
||||
}
|
||||
|
|
|
@ -3,12 +3,6 @@
|
|||
|
||||
#include "nasal.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#define NASAL_EXPORT __declspec(dllexport)
|
||||
#else
|
||||
#define NASAL_EXPORT __attribute__((visibility("default")))
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue