diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-01-26 16:16:29 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-01-26 16:16:29 +0000 |
commit | d9095cec1bba87df718f5a1d0a9ab42fe217cea4 (patch) | |
tree | c9fa8049db941c9278d890ee93ab5c93553b70d7 /cop.h | |
parent | abf8b121784743d34fc5407ef35129d1bbdffb2d (diff) | |
download | perl-d9095cec1bba87df718f5a1d0a9ab42fe217cea4.tar.gz |
Stop S_incline needing to temporarily write a '\0' into its passed-in
buffer. (Requires adding gv_fetchfile_flags(), savesharedpvn() and
CopFILE_setn() to provide pointer/length versions of APIs)
p4raw-id: //depot/perl@30015
Diffstat (limited to 'cop.h')
-rw-r--r-- | cop.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -160,8 +160,10 @@ struct cop { # ifdef NETWARE # define CopFILE_set(c,pv) ((c)->cop_file = savepv(pv)) +# define CopFILE_setn(c,pv,l) ((c)->cop_file = savepv((pv),(l))) # else # define CopFILE_set(c,pv) ((c)->cop_file = savesharedpv(pv)) +# define CopFILE_setn(c,pv,l) ((c)->cop_file = savesharedpvn((pv),(l))) # endif # define CopFILESV(c) (CopFILE(c) \ @@ -203,6 +205,7 @@ struct cop { # define CopFILEGV(c) ((c)->cop_filegv) # define CopFILEGV_set(c,gv) ((c)->cop_filegv = (GV*)SvREFCNT_inc(gv)) # define CopFILE_set(c,pv) CopFILEGV_set((c), gv_fetchfile(pv)) +# define CopFILE_setn(c,pv,l) CopFILEGV_set((c), gv_fetchfile_flags((pv),(l),0)) # define CopFILESV(c) (CopFILEGV(c) ? GvSV(CopFILEGV(c)) : NULL) # define CopFILEAV(c) (CopFILEGV(c) ? GvAV(CopFILEGV(c)) : NULL) # ifdef DEBUGGING |