summaryrefslogtreecommitdiff
path: root/vms/ext
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-11-29 16:08:03 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-11-29 16:08:03 +0000
commit2d8e6c8d50eaf50f663a5fd184404c73944226e0 (patch)
treee5592e6ebd4ebedeee8ebc8ddbb60cad5f477fc4 /vms/ext
parentb099ddc068b2498767e6f04ac167d9633b895ec4 (diff)
downloadperl-2d8e6c8d50eaf50f663a5fd184404c73944226e0.tar.gz
another threads reliability fix: serialize writes to thr->threadsv
avoid most uses of PL_na (which is much more inefficient than a simple local); update docs to suit; PL_na now being thr->Tna may be a minor compatibility issue for extensions--will require dTHR outside of XSUBs (those get automatic dTHR) p4raw-id: //depot/perl@2387
Diffstat (limited to 'vms/ext')
-rw-r--r--vms/ext/Stdio/Stdio.xs9
1 files changed, 6 insertions, 3 deletions
diff --git a/vms/ext/Stdio/Stdio.xs b/vms/ext/Stdio/Stdio.xs
index 6fa1b29bbe..53b491575d 100644
--- a/vms/ext/Stdio/Stdio.xs
+++ b/vms/ext/Stdio/Stdio.xs
@@ -164,11 +164,12 @@ setdef(...)
struct FAB deffab = cc$rms_fab;
struct NAM defnam = cc$rms_nam;
struct dsc$descriptor_s dirdsc = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0};
+ STRLEN n_a;
if (items) {
SV *defsv = ST(items-1); /* mimic chdir() */
ST(0) = &PL_sv_undef;
if (!SvPOK(defsv)) { SETERRNO(EINVAL,LIB$_INVARG); XSRETURN(1); }
- if (tovmsspec(SvPV(defsv,PL_na),vmsdef) == NULL) { XSRETURN(1); }
+ if (tovmsspec(SvPV(defsv,n_a),vmsdef) == NULL) { XSRETURN(1); }
deffab.fab$l_fna = vmsdef; deffab.fab$b_fns = strlen(vmsdef);
}
else {
@@ -232,6 +233,7 @@ vmsopen(spec,...)
char *args[8],mode[3] = {'r','\0','\0'}, type = '<';
register int i, myargc;
FILE *fp;
+ STRLEN n_a;
if (!spec || !*spec) {
SETERRNO(EINVAL,LIB$_INVARG);
@@ -250,7 +252,7 @@ vmsopen(spec,...)
}
else if (*spec == '<') spec++;
myargc = items - 1;
- for (i = 0; i < myargc; i++) args[i] = SvPV(ST(i+1),PL_na);
+ for (i = 0; i < myargc; i++) args[i] = SvPV(ST(i+1),n_a);
/* This hack brought to you by C's opaque arglist management */
switch (myargc) {
case 0:
@@ -298,13 +300,14 @@ vmssysopen(spec,mode,perm,...)
int i, myargc, fd;
FILE *fp;
SV *fh;
+ STRLEN n_a;
if (!spec || !*spec) {
SETERRNO(EINVAL,LIB$_INVARG);
XSRETURN_UNDEF;
}
if (items > 11) croak("too many args");
myargc = items - 3;
- for (i = 0; i < myargc; i++) args[i] = SvPV(ST(i+3),PL_na);
+ for (i = 0; i < myargc; i++) args[i] = SvPV(ST(i+3),n_a);
/* More fun with C calls; can't combine with above because
args 2,3 of different types in fopen() and open() */
switch (myargc) {