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.
This commit is contained in:
+10
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user