diff options
| author | Pavel Roskin <plroskin@gmail.com> | 2016-07-08 05:09:09 +0000 |
|---|---|---|
| committer | Pavel Roskin <plroskin@gmail.com> | 2016-07-08 05:09:09 +0000 |
| commit | ace7d2c822937a9cb0637946f85d1fbd63562c44 (patch) | |
| tree | 37dbd54c8eb00f496f18aebf6e24c5b893550970 /rdp | |
| parent | 2c13ef5c6dd90ee2dcbcba282b2ee702e2ee9f84 (diff) | |
| download | xrdp-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 'rdp')
| -rw-r--r-- | rdp/rdp.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -318,7 +318,7 @@ lib_mod_check_wait_objs(struct mod *mod) } /******************************************************************************/ -struct mod *EXPORT_CC +tintptr EXPORT_CC mod_init(void) { struct mod *mod; @@ -327,7 +327,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 = (long)mod; + mod->handle = (tintptr) mod; mod->mod_connect = lib_mod_connect; mod->mod_start = lib_mod_start; mod->mod_event = lib_mod_event; @@ -338,13 +338,15 @@ mod_init(void) mod->mod_check_wait_objs = lib_mod_check_wait_objs; mod->rdp_layer = rdp_rdp_create(mod); DEBUG(("out mod_init")); - return mod; + return (tintptr) mod; } /******************************************************************************/ int EXPORT_CC -mod_exit(struct mod *mod) +mod_exit(tintptr handle) { + struct mod *mod = (struct mod *) handle; + DEBUG(("in mod_exit")); g_free(mod); DEBUG(("out mod_exit")); |
