From: Craig A. Berry Date: Sat, 27 May 2006 18:00:31 +0000 (+0000) Subject: use the same arg names everyone else does and handle undef filename X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a491bdcd42edb4bd84d631c28c304d781a4d4fa2;p=p5sagit%2Fp5-mst-13.2.git use the same arg names everyone else does and handle undef filename p4raw-id: //depot/perl@28318 --- diff --git a/ext/DynaLoader/dl_vms.xs b/ext/DynaLoader/dl_vms.xs index 1df7a40..e476663 100644 --- a/ext/DynaLoader/dl_vms.xs +++ b/ext/DynaLoader/dl_vms.xs @@ -1,8 +1,8 @@ /* dl_vms.xs * - * Platform: OpenVMS, VAX or AXP + * Platform: OpenVMS, VAX or AXP or IA64 * Author: Charles Bailey bailey@newman.upenn.edu - * Revised: 12-Dec-1994 + * Revised: See http://public.activestate.com/cgi-bin/perlbrowse * * Implementation Note * This section is added as an aid to users and DynaLoader developers, in @@ -247,8 +247,8 @@ dl_expandspec(filespec) } void -dl_load_file(filespec, flags) - char * filespec +dl_load_file(filename, flags=0) + char * filename int flags PREINIT: dTHX; @@ -269,10 +269,13 @@ dl_load_file(filespec, flags) void (*entry)(); CODE: - DLDEBUG(1,PerlIO_printf(Perl_debug_log, "dl_load_file(%s,%x):\n", filespec,flags)); - specdsc.dsc$a_pointer = tovmsspec(filespec,vmsspec); + DLDEBUG(1,PerlIO_printf(Perl_debug_log, "dl_load_file(%s,%x):\n", filename,flags)); + specdsc.dsc$a_pointer = tovmsspec(filename,vmsspec); specdsc.dsc$w_length = strlen(specdsc.dsc$a_pointer); - DLDEBUG(2,PerlIO_printf(Perl_debug_log, "\tVMS-ified filespec is %s\n", + if (specdsc.dsc$w_length == 0) { /* undef in, empty out */ + XSRETURN_EMPTY; + } + DLDEBUG(2,PerlIO_printf(Perl_debug_log, "\tVMS-ified filename is %s\n", specdsc.dsc$a_pointer)); Newx(dlptr,1,struct libref); dlptr->name.dsc$b_dtype = dlptr->defspec.dsc$b_dtype = DSC$K_DTYPE_T; @@ -338,7 +341,7 @@ dl_find_symbol(librefptr,symname) void (*entry)(); vmssts sts; - DLDEBUG(1,PerlIO_printf(Perl_debug_log, "dl_find_dymbol(%.*s,%.*s):\n", + DLDEBUG(1,PerlIO_printf(Perl_debug_log, "dl_find_symbol(%.*s,%.*s):\n", thislib.name.dsc$w_length, thislib.name.dsc$a_pointer, symdsc.dsc$w_length,symdsc.dsc$a_pointer)); sts = my_find_image_symbol(&(thislib.name),&symdsc,