summaryrefslogtreecommitdiff
path: root/handy.h
diff options
context:
space:
mode:
authorGisle Aas <gisle@activestate.com>2006-01-04 10:44:48 +0000
committerGisle Aas <gisle@activestate.com>2006-01-04 10:44:48 +0000
commit2efa8cc776fec30c63893949ea1f5a5eb0cd3564 (patch)
treef3390c091acde96bc2307f54e56bb248aa761ed4 /handy.h
parent834268b87a8eb670d899a13106c8dfcdfc7c9b66 (diff)
downloadperl-2efa8cc776fec30c63893949ea1f5a5eb0cd3564.tar.gz
Introduce STR_WITH_LEN macro in the form suggested by Chip.
p4raw-id: //depot/perl@26635
Diffstat (limited to 'handy.h')
-rw-r--r--handy.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/handy.h b/handy.h
index 6c87f9137e..b587ea5361 100644
--- a/handy.h
+++ b/handy.h
@@ -236,6 +236,9 @@ typedef U64TYPE U64;
#define Ctl(ch) ((ch) & 037)
+/* concatenating with "" ensures that only literal strings are accepted as agument */
+#define STR_WITH_LEN(s) (s ""), (sizeof(s)-1)
+
/*
=head1 Miscellaneous Functions