summaryrefslogtreecommitdiff
path: root/cop.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-01-26 16:16:29 +0000
committerNicholas Clark <nick@ccl4.org>2007-01-26 16:16:29 +0000
commitd9095cec1bba87df718f5a1d0a9ab42fe217cea4 (patch)
treec9fa8049db941c9278d890ee93ab5c93553b70d7 /cop.h
parentabf8b121784743d34fc5407ef35129d1bbdffb2d (diff)
downloadperl-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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/cop.h b/cop.h
index 518a396900..1062056b29 100644
--- a/cop.h
+++ b/cop.h
@@ -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