diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 1997-11-01 00:18:52 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 1997-11-01 00:18:52 +0000 |
commit | af702f0e61214b54e323d12ffeaff4e64bee707c (patch) | |
tree | 2c9b5734fbd3c421d2d20c9e6877c8d10957e47c /mg.c | |
parent | f890e7c81bc0e52bedc3dcefbcd144d0750c257d (diff) | |
parent | a863c7d16499251f020c5d26d232aa865fa0b197 (diff) | |
download | perl-af702f0e61214b54e323d12ffeaff4e64bee707c.tar.gz |
Integrate mainline @ 18:15 CST 31 Oct 1997
p4raw-id: //depot/ansiperl@199
Diffstat (limited to 'mg.c')
-rw-r--r-- | mg.c | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -247,6 +247,7 @@ mg_free(SV *sv) U32 magic_len(SV *sv, MAGIC *mg) { + dTHR; register I32 paren; register char *s; register I32 i; @@ -310,6 +311,7 @@ magic_len(SV *sv, MAGIC *mg) int magic_get(SV *sv, MAGIC *mg) { + dTHR; register I32 paren; register char *s; register I32 i; @@ -396,7 +398,11 @@ magic_get(SV *sv, MAGIC *mg) case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case '&': if (curpm && (rx = curpm->op_pmregexp)) { - paren = atoi(GvENAME((GV*)mg->mg_obj)); + /* + * Pre-threads, this was paren = atoi(GvENAME((GV*)mg->mg_obj)); + * XXX Does the new way break anything? + */ + paren = atoi(mg->mg_ptr); getparen: if (paren <= rx->nparens && (s = rx->startp[paren]) && @@ -553,6 +559,11 @@ magic_get(SV *sv, MAGIC *mg) break; case '0': break; +#ifdef USE_THREADS + case '@': + sv_setsv(sv, errsv); + break; +#endif /* USE_THREADS */ } return 0; } @@ -718,7 +729,6 @@ magic_getsig(SV *sv, MAGIC *mg) if(psig_ptr[i]) sv_setsv(sv,psig_ptr[i]); else { - dTHR; /* just for SvREFCNT_inc */ Sighandler_t sigstate = rsignal_state(i); /* cache state so we don't fetch it again */ @@ -1102,6 +1112,7 @@ magic_setsubstr(SV *sv, MAGIC *mg) int magic_gettaint(SV *sv, MAGIC *mg) { + dTHR; TAINT_IF((mg->mg_len & 1) || (mg->mg_len & 2) && mg->mg_obj == sv); /* kludge */ return 0; @@ -1608,6 +1619,11 @@ magic_set(SV *sv, MAGIC *mg) origargv[i] = Nullch; } break; +#ifdef USE_THREADS + case '@': + sv_setsv(errsv, sv); + break; +#endif /* USE_THREADS */ } return 0; } |