summaryrefslogtreecommitdiff
path: root/ext/DynaLoader/dl_vms.xs
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2013-11-26 13:29:08 +0000
committerDavid Mitchell <davem@iabyn.com>2013-11-26 13:29:08 +0000
commit3e584864f634c8ccfaa48b2ffec64644d3b2c011 (patch)
tree35536b7292ab592c2bedf88e3880af68eba8a0f1 /ext/DynaLoader/dl_vms.xs
parentdf9e1087beb66b5a5eb28ff3c2f0756f25256bc4 (diff)
downloadperl-3e584864f634c8ccfaa48b2ffec64644d3b2c011.tar.gz
Dynaloader: use PREINIT to avoid compiler errors
A recent change to the typmap definitions makes a var declaration generate code. Move this declaration from CODE: to PREINIT: to avoid a 'Mixed declarations' compiler error. This was spotted in dl_hpux.xs by bulk88, which I've blindly fixed. From visual inspection there were also declarations in dl_vms.xs that needed moving (although in that case it dosen't trigger the typemap code emission).
Diffstat (limited to 'ext/DynaLoader/dl_vms.xs')
-rw-r--r--ext/DynaLoader/dl_vms.xs3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/DynaLoader/dl_vms.xs b/ext/DynaLoader/dl_vms.xs
index d30d8396b7..6eb2c546b2 100644
--- a/ext/DynaLoader/dl_vms.xs
+++ b/ext/DynaLoader/dl_vms.xs
@@ -303,12 +303,13 @@ void
dl_find_symbol(librefptr,symname)
void * librefptr
SV * symname
- CODE:
+ PREINIT:
struct libref thislib = *((struct libref *)librefptr);
struct dsc$descriptor_s
symdsc = {SvCUR(symname),DSC$K_DTYPE_T,DSC$K_CLASS_S,SvPVX(symname)};
void (*entry)();
vmssts sts;
+ CODE:
DLDEBUG(1,PerlIO_printf(Perl_debug_log, "dl_find_symbol(%.*s,%.*s):\n",
thislib.name.dsc$w_length, thislib.name.dsc$a_pointer,