diff options
author | Doug MacEachern <dougm@covalent.net> | 2002-06-09 09:49:25 -0700 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-06-09 23:25:04 +0000 |
commit | 59b4066285adfb32f43328ed52e37356d33be015 (patch) | |
tree | 3a016bc5c1debdf941b87869ae7e1ec06eef7e92 | |
parent | b238e82634f7c3c5500709c523a925d0d03b1f42 (diff) | |
download | perl-59b4066285adfb32f43328ed52e37356d33be015.tar.gz |
Re: unique attribute?
Message-ID: <Pine.LNX.4.33.0206091645330.26891-100000@mako.covalent.net>
p4raw-id: //depot/perl@17153
-rw-r--r-- | embed.fnc | 2 | ||||
-rw-r--r-- | embed.h | 2 | ||||
-rw-r--r-- | proto.h | 2 | ||||
-rw-r--r-- | sv.c | 7 | ||||
-rw-r--r-- | sv.h | 1 |
5 files changed, 8 insertions, 6 deletions
@@ -1242,7 +1242,7 @@ s |int |sv_2iuv_non_preserve |SV *sv|I32 numtype s |I32 |expect_number |char** pattern # # if defined(USE_ITHREADS) -s |SV* |gv_share |SV *sv +s |SV* |gv_share |SV *sv|CLONE_PARAMS *param # endif #endif @@ -2671,7 +2671,7 @@ # endif #define expect_number(a) S_expect_number(aTHX_ a) # if defined(USE_ITHREADS) -#define gv_share(a) S_gv_share(aTHX_ a) +#define gv_share(a,b) S_gv_share(aTHX_ a,b) # endif #endif #if defined(PERL_IN_TOKE_C) || defined(PERL_DECL_PROT) @@ -1275,7 +1275,7 @@ STATIC int S_sv_2iuv_non_preserve(pTHX_ SV *sv, I32 numtype); STATIC I32 S_expect_number(pTHX_ char** pattern); # # if defined(USE_ITHREADS) -STATIC SV* S_gv_share(pTHX_ SV *sv); +STATIC SV* S_gv_share(pTHX_ SV *sv, CLONE_PARAMS *param); # endif #endif @@ -8859,10 +8859,10 @@ char *PL_watch_pvx; /* attempt to make everything in the typeglob readonly */ STATIC SV * -S_gv_share(pTHX_ SV *sstr) +S_gv_share(pTHX_ SV *sstr, CLONE_PARAMS *param) { GV *gv = (GV*)sstr; - SV *sv = &PL_sv_no; /* just need SvREADONLY-ness */ + SV *sv = ¶m->proto_perl->Isv_no; /* just need SvREADONLY-ness */ if (GvIO(gv) || GvFORM(gv)) { GvUNIQUE_off(gv); /* GvIOs cannot be shared. nor can GvFORMs */ @@ -9053,7 +9053,7 @@ Perl_sv_dup(pTHX_ SV *sstr, CLONE_PARAMS* param) case SVt_PVGV: if (GvUNIQUE((GV*)sstr)) { SV *share; - if ((share = gv_share(sstr))) { + if ((share = gv_share(sstr, param))) { del_SV(dstr); dstr = share; ptr_table_store(PL_ptr_table, sstr, dstr); @@ -9759,6 +9759,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, # endif /* DEBUGGING */ #endif /* PERL_IMPLICIT_SYS */ param->flags = flags; + param->proto_perl = proto_perl; /* arena roots */ PL_xiv_arenaroot = NULL; @@ -1206,4 +1206,5 @@ Returns a pointer to the character buffer. struct clone_params { AV* stashes; UV flags; + PerlInterpreter *proto_perl; }; |