summaryrefslogtreecommitdiffstats
path: root/xup
diff options
context:
space:
mode:
authorPavel Roskin <plroskin@gmail.com>2016-07-08 05:09:09 +0000
committerPavel Roskin <plroskin@gmail.com>2016-07-08 05:09:09 +0000
commitace7d2c822937a9cb0637946f85d1fbd63562c44 (patch)
tree37dbd54c8eb00f496f18aebf6e24c5b893550970 /xup
parent2c13ef5c6dd90ee2dcbcba282b2ee702e2ee9f84 (diff)
downloadxrdp-proprietary-ace7d2c822937a9cb0637946f85d1fbd63562c44.tar.gz
xrdp-proprietary-ace7d2c822937a9cb0637946f85d1fbd63562c44.zip
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.
Diffstat (limited to 'xup')
-rw-r--r--xup/xup.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/xup/xup.c b/xup/xup.c
index b841985e..e2c34ca8 100644
--- a/xup/xup.c
+++ b/xup/xup.c
@@ -1552,7 +1552,7 @@ lib_mod_frame_ack(struct mod *amod, int flags, int frame_id)
}
/******************************************************************************/
-struct mod *EXPORT_CC
+tintptr EXPORT_CC
mod_init(void)
{
struct mod *mod;
@@ -1560,7 +1560,7 @@ mod_init(void)
mod = (struct mod *)g_malloc(sizeof(struct mod), 1);
mod->size = sizeof(struct mod);
mod->version = CURRENT_MOD_VER;
- mod->handle = (tbus)mod;
+ mod->handle = (tintptr) mod;
mod->mod_connect = lib_mod_connect;
mod->mod_start = lib_mod_start;
mod->mod_event = lib_mod_event;
@@ -1570,13 +1570,15 @@ mod_init(void)
mod->mod_get_wait_objs = lib_mod_get_wait_objs;
mod->mod_check_wait_objs = lib_mod_check_wait_objs;
mod->mod_frame_ack = lib_mod_frame_ack;
- return mod;
+ return (tintptr) mod;
}
/******************************************************************************/
int EXPORT_CC
-mod_exit(struct mod *mod)
+mod_exit(tintptr handle)
{
+ struct mod *mod = (struct mod *) handle;
+
if (mod == 0)
{
return 0;