summaryrefslogtreecommitdiffstats
path: root/vnc
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 /vnc
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 'vnc')
-rw-r--r--vnc/vnc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/vnc/vnc.c b/vnc/vnc.c
index 99245b53..8da35f5a 100644
--- a/vnc/vnc.c
+++ b/vnc/vnc.c
@@ -1465,7 +1465,7 @@ lib_mod_check_wait_objs(struct vnc *v)
}
/******************************************************************************/
-struct vnc *EXPORT_CC
+tintptr EXPORT_CC
mod_init(void)
{
struct vnc *v;
@@ -1474,7 +1474,7 @@ mod_init(void)
/* set client functions */
v->size = sizeof(struct vnc);
v->version = CURRENT_MOD_VER;
- v->handle = (long)v;
+ v->handle = (tintptr) v;
v->mod_connect = lib_mod_connect;
v->mod_start = lib_mod_start;
v->mod_event = lib_mod_event;
@@ -1483,13 +1483,14 @@ mod_init(void)
v->mod_set_param = lib_mod_set_param;
v->mod_get_wait_objs = lib_mod_get_wait_objs;
v->mod_check_wait_objs = lib_mod_check_wait_objs;
- return v;
+ return (tintptr) v;
}
/******************************************************************************/
int EXPORT_CC
-mod_exit(struct vnc *v)
+mod_exit(tintptr handle)
{
+ struct vnc *v = (struct vnc *) handle;
log_message(LOG_LEVEL_DEBUG, "VNC mod_exit");
if (v == 0)