diff options
author | Reini Urban <rurban@cpanel.net> | 2015-03-12 23:45:51 +0100 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2015-11-11 08:56:28 +1100 |
commit | fd46a708fc894e9651374e1e8e256f365a25dffd (patch) | |
tree | b2a05ead4e120e873f400fe6cd45e6d105fe8fb2 /ext/DynaLoader/dl_vms.xs | |
parent | 067cec4c785ab7f64d2974ec6622bb9f4fa53eac (diff) | |
download | perl-fd46a708fc894e9651374e1e8e256f365a25dffd.tar.gz |
DynaLoader 1.36 dl_find_symbol add 3rd optional argument
On Darwin DynaLoader::bootstrap tries dl_find_symbol first with libhandle 0,
to see if the shlib with the symbol is already loaded, e.g. with libc.
We do not want to store the dl_last_error information for this mostly
failing probe, so add an optional ign_err=0 argument.
Similar for dl_find_symbol_anywhere, which is expected to fail for all librefs.
Also support dl_last_error on symbian, as on all other platforms.
TonyC: fix bad XS
Diffstat (limited to 'ext/DynaLoader/dl_vms.xs')
-rw-r--r-- | ext/DynaLoader/dl_vms.xs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/DynaLoader/dl_vms.xs b/ext/DynaLoader/dl_vms.xs index ca8d54f6d2..1a17793a52 100644 --- a/ext/DynaLoader/dl_vms.xs +++ b/ext/DynaLoader/dl_vms.xs @@ -301,9 +301,10 @@ dl_load_file(filename, flags=0) void -dl_find_symbol(librefptr,symname) +dl_find_symbol(librefptr,symname,ign_err=0) void * librefptr SV * symname + int ign_err PREINIT: struct libref thislib = *((struct libref *)librefptr); struct dsc$descriptor_s @@ -321,7 +322,7 @@ dl_find_symbol(librefptr,symname) DLDEBUG(2,PerlIO_printf(Perl_debug_log, "\tentry point is %d\n", (unsigned long int) entry)); if (!(sts & 1)) { - dl_set_error(sts,0); + if (!ign_err) dl_set_error(sts,0); ST(0) = &PL_sv_undef; } else ST(0) = sv_2mortal(newSViv(PTR2IV(entry))); |