diff options
author | Larry Wall <larry@netlabs.com> | 1994-03-18 00:00:00 +0000 |
---|---|---|
committer | Larry Wall <larry@netlabs.com> | 1994-03-18 00:00:00 +0000 |
commit | 8990e3071044a96302560bbdb5706f3e74cf1bef (patch) | |
tree | 6cf4a58108544204591f25bd2d4f1801d49334b4 /doop.c | |
parent | ed6116ce9b9d13712ea252ee248b0400653db7f9 (diff) | |
download | perl-8990e3071044a96302560bbdb5706f3e74cf1bef.tar.gz |
perl 5.0 alpha 6
[editor's note: cleaned up from the September '94 InfoMagic CD, just
like the last commit]
Diffstat (limited to 'doop.c')
-rw-r--r-- | doop.c | 20 |
1 files changed, 15 insertions, 5 deletions
@@ -163,8 +163,14 @@ register SV **sp; } if (items-- > 0) { - char *s = SvPV(*mark, tmplen); - sv_setpvn(sv, s, tmplen); + char *s; + + if (*mark) { + s = SvPV(*mark, tmplen); + sv_setpvn(sv, s, tmplen); + } + else + sv_setpv(sv, ""); mark++; } else @@ -377,10 +383,14 @@ SV *sv; SV *targ = LvTARG(sv); register I32 offset; register I32 size; - register unsigned char *s = (unsigned char*)SvPVX(targ); - register unsigned long lval = U_L(SvNV(sv)); + register unsigned char *s; + register unsigned long lval; I32 mask; + if (!targ) + return; + s = (unsigned char*)SvPVX(targ); + lval = U_L(SvNV(sv)); offset = LvTARGOFF(sv); size = LvTARGLEN(sv); if (size < 8) { @@ -584,7 +594,7 @@ dARGS if (GIMME != G_ARRAY) { dTARGET; - if (!SvMAGICAL(hv) || !mg_find((SV*)hv,'P')) + if (!SvRMAGICAL(hv) || !mg_find((SV*)hv,'P')) i = HvKEYS(hv); else { i = 0; |