mirror of
https://github.com/ValKmjolnir/Nasal-Interpreter.git
synced 2026-05-02 19:00:47 +08:00
🐛 fix error loading bug in MSVC version
This commit is contained in:
@@ -593,7 +593,7 @@ module_func_info func_tbl[] = {
|
||||
// the reason why using this way to get function pointer
|
||||
// is because `var` has constructors, which is not compatiable in C
|
||||
// so "extern "C" var fib" may get compilation warnings
|
||||
extern "C" module_func_info* get() {
|
||||
NASAL_EXTERN module_func_info* get() {
|
||||
return func_tbl;
|
||||
}
|
||||
```
|
||||
|
||||
@@ -574,7 +574,7 @@ module_func_info func_tbl[] = {
|
||||
// 之所以用这种方式来获取函数指针, 是因为`var`是有构造函数的
|
||||
// 有构造函数的类型作为返回值, 和C是不兼容的, 这导致
|
||||
// 类似 "extern "C" var fib" 的写法会得到编译错误
|
||||
extern "C" module_func_info* get() {
|
||||
NASAL_EXTERN module_func_info* get() {
|
||||
return func_tbl;
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user