diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-12-20 09:30:06 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-12-20 09:30:06 +0000 |
commit | 7bf061987421c117ea5f8db9475ff899f75b9098 (patch) | |
tree | 135c4245ded488e91333d90bf20d9cdee25299f2 /cop.h | |
parent | ba2940cef5817468ce021916ff709a8ba665e2eb (diff) | |
download | perl-7bf061987421c117ea5f8db9475ff899f75b9098.tar.gz |
Don't free the original label string when assigning it to cop_label,
since it comes directly from the parser. (That was making op/goto.t
fail under threads and without debugging on some platforms.)
p4raw-id: //depot/perl@29600
Diffstat (limited to 'cop.h')
-rw-r--r-- | cop.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -187,10 +187,11 @@ struct cop { # define CopSTASH_set(c,hv) CopSTASHPV_set(c, (hv) ? HvNAME_get(hv) : NULL) # define CopSTASH_eq(c,hv) ((hv) && stashpv_hvname_match(c,hv)) # define CopLABEL(c) ((c)->cop_label) +/* Don't free the original label here, it will be freed by the parser */ # ifdef NETWARE -# define CopLABEL_set(c,pv) ((CopLABEL(c) = ((pv) ? savepv(pv) : NULL)), Safefree(pv), ((pv) = NULL)) +# define CopLABEL_set(c,pv) (CopLABEL(c) = ((pv) ? savepv(pv) : NULL)) # else -# define CopLABEL_set(c,pv) ((CopLABEL(c) = savesharedpv(pv)), Safefree(pv), ((pv) = NULL)) +# define CopLABEL_set(c,pv) (CopLABEL(c) = savesharedpv(pv)) # endif # ifdef NETWARE # define CopSTASH_free(c) SAVECOPSTASH_FREE(c) |