From ace7d2c822937a9cb0637946f85d1fbd63562c44 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Fri, 8 Jul 2016 05:09:09 +0000 Subject: Declare unified module interface and use it in modules This fixes loading modules compiled with a C++ compiler. Remote thandle type, it's unused. Use tintptr for module data. Don't cast pointers to long, they won't fit on Win64. --- common/arch.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'common/arch.h') diff --git a/common/arch.h b/common/arch.h index 5c67cb66..7070d6ae 100644 --- a/common/arch.h +++ b/common/arch.h @@ -113,7 +113,6 @@ typedef __int64 tbus; #else typedef long tbus; #endif -typedef tbus thandle; typedef tbus tintptr; /* wide char, socket */ #if defined(_WIN32) @@ -137,4 +136,14 @@ typedef signed long long tsi64; #define printflike(arg_format, arg_first_check) #endif +/* module interface */ +#ifdef __cplusplus +extern "C" { +#endif + tintptr mod_init(); + int mod_exit(tintptr); +#ifdef __cplusplus +} +#endif + #endif -- cgit v1.2.3