X-Git-Url: http://git.imager.perl.org/imager.git/blobdiff_plain/e386cd1d5a7cd94822f7b99eb08d960e0139bf4b..e1c0692925:/dynaload.c?ds=sidebyside diff --git a/dynaload.c b/dynaload.c index 75f1b3f5..faa605da 100644 --- a/dynaload.c +++ b/dynaload.c @@ -11,7 +11,7 @@ typedef HMODULE minthandle_t; typedef void *minthandle_t; #endif -#include "plug.h" +#include "ext.h" struct DSO_handle_tag { minthandle_t handle; @@ -24,14 +24,18 @@ struct DSO_handle_tag { /* #include "XSUB.h" so we can compile on threaded perls */ #include "imageri.h" +static im_context_t +do_get_context(void) { + return im_get_context(); +} + static symbol_table_t symbol_table= { i_has_format, ICL_set_internal, ICL_info, - i_img_new, - i_img_empty, - i_img_empty_ch, + do_get_context, + im_img_empty_ch, i_img_exorcise, i_img_info, i_img_setmask, @@ -55,7 +59,8 @@ static symbol_table_t symbol_table= void DSO_call(DSO_handle *handle,int func_index,HV* hv) { - mm_log((1,"DSO_call(handle 0x%X, func_index %d, hv 0x%X)\n",handle,func_index,hv)); + mm_log((1,"DSO_call(handle %p, func_index %d, hv %p)\n", + handle, func_index, hv)); (handle->function_list[func_index].iptr)((void*)hv); } @@ -129,7 +134,7 @@ DSO_open(char *file, char **evalstring) { void (*f)(void *s,void *u); /* these will just have to be void for now */ - mm_log( (1,"DSO_open(file '%s' (0x%08X), evalstring 0x%08X)\n",file,file,evalstring) ); + mm_log( (1,"DSO_open(file '%s' (%p), evalstring %p)\n",file,file,evalstring) ); *evalstring = NULL; if ((d_handle = LoadLibrary(file)) == NULL) { @@ -169,7 +174,7 @@ DSO_open(char *file, char **evalstring) { } strcpy(dso_handle->filename,file); - mm_log( (1,"DSO_open <- 0x%X\n",dso_handle) ); + mm_log( (1,"DSO_open <- %p\n",dso_handle) ); return (void*)dso_handle; } @@ -204,7 +209,8 @@ DSO_open(char* file,char** evalstring) { *evalstring=NULL; - mm_log( (1,"DSO_open(file '%s' (0x%08X), evalstring 0x%08X)\n",file,file,evalstring) ); + mm_log( (1,"DSO_open(file '%s' (%p), evalstring %p)\n", + file, file, evalstring) ); if ( (d_handle = dlopen(file, RTLD_LAZY)) == NULL) { mm_log( (1,"DSO_open: dlopen failed: %s.\n",dlerror()) ); @@ -265,14 +271,14 @@ DSO_open(char* file,char** evalstring) { } strcpy(dso_handle->filename,file); - mm_log( (1,"DSO_open <- 0x%X\n",dso_handle) ); + mm_log( (1,"DSO_open <- %p\n",dso_handle) ); return (void*)dso_handle; } undef_int DSO_close(void *ptr) { DSO_handle *handle; - mm_log((1,"DSO_close(ptr 0x%X)\n",ptr)); + mm_log((1,"DSO_close(ptr %p)\n",ptr)); handle=(DSO_handle*) ptr; return !dlclose(handle->handle); }