diff options
Diffstat (limited to 'ext/DynaLoader/dl_next.xs')
-rw-r--r-- | ext/DynaLoader/dl_next.xs | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/ext/DynaLoader/dl_next.xs b/ext/DynaLoader/dl_next.xs index 2b547f0f00..ec01d608f4 100644 --- a/ext/DynaLoader/dl_next.xs +++ b/ext/DynaLoader/dl_next.xs @@ -72,6 +72,7 @@ enum dyldErrorSource static void TranslateError (const char *path, enum dyldErrorSource type, int number) { + dTHX; char *error; unsigned int index; static char *OFIErrorStrings[] = @@ -172,6 +173,7 @@ static char *dlopen(char *path, int mode /* mode is ignored */) I32 i, psize; char *result; char **p; + STRLEN n_a; /* Do not load what is already loaded into this process */ if (hv_fetch(dl_loaded_files, path, strlen(path), 0)) @@ -182,7 +184,7 @@ static char *dlopen(char *path, int mode /* mode is ignored */) p = (char **) safemalloc(psize * sizeof(char*)); p[0] = path; for(i=1; i<psize-1; i++) { - p[i] = SvPVx(*av_fetch(dl_resolve_using, i-1, TRUE), PL_na); + p[i] = SvPVx(*av_fetch(dl_resolve_using, i-1, TRUE), n_a); } p[psize-1] = 0; rld_success = rld_load(nxerr, (struct mach_header **)0, p, @@ -221,16 +223,16 @@ char *symbol; static void -dl_private_init() +dl_private_init(pTHX) { - (void)dl_generic_private_init(); - dl_resolve_using = perl_get_av("DynaLoader::dl_resolve_using", 0x4); + (void)dl_generic_private_init(aTHX); + dl_resolve_using = get_av("DynaLoader::dl_resolve_using", 0x4); } MODULE = DynaLoader PACKAGE = DynaLoader BOOT: - (void)dl_private_init(); + (void)dl_private_init(aTHX); @@ -243,12 +245,12 @@ dl_load_file(filename, flags=0) CODE: DLDEBUG(1,PerlIO_printf(PerlIO_stderr(), "dl_load_file(%s,%x):\n", filename,flags)); if (flags & 0x01) - warn("Can't make loaded symbols global on this platform while loading %s",filename); + Perl_warn(aTHX_ "Can't make loaded symbols global on this platform while loading %s",filename); RETVAL = dlopen(filename, mode) ; DLDEBUG(2,PerlIO_printf(PerlIO_stderr(), " libref=%x\n", RETVAL)); ST(0) = sv_newmortal() ; if (RETVAL == NULL) - SaveError("%s",dlerror()) ; + SaveError(aTHX_ "%s",dlerror()) ; else sv_setiv( ST(0), (IV)RETVAL); @@ -269,7 +271,7 @@ dl_find_symbol(libhandle, symbolname) " symbolref = %lx\n", (unsigned long) RETVAL)); ST(0) = sv_newmortal() ; if (RETVAL == NULL) - SaveError("%s",dlerror()) ; + SaveError(aTHX_ "%s",dlerror()) ; else sv_setiv( ST(0), (IV)RETVAL); @@ -290,7 +292,9 @@ dl_install_xsub(perl_name, symref, filename="$Package") CODE: DLDEBUG(2,PerlIO_printf(PerlIO_stderr(), "dl_install_xsub(name=%s, symref=%x)\n", perl_name, symref)); - ST(0)=sv_2mortal(newRV((SV*)newXS(perl_name, (void(*)())symref, filename))); + ST(0) = sv_2mortal(newRV((SV*)newXS(perl_name, + (void(*)(pTHX_ CV *))symref, + filename))); char * |