From 3faf8d6bffc5d0fb2525ba37bb504c53366caf9d Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Tue, 8 May 2018 03:44:38 +0000 Subject: Import Subversion-1.10.0 --- subversion/include/private/svn_string_private.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'subversion/include/private/svn_string_private.h') diff --git a/subversion/include/private/svn_string_private.h b/subversion/include/private/svn_string_private.h index 2f162733db81..25e42049db7b 100644 --- a/subversion/include/private/svn_string_private.h +++ b/subversion/include/private/svn_string_private.h @@ -131,6 +131,14 @@ svn_membuf__nzero(svn_membuf_t *membuf, apr_size_t size); svn_string_t * svn_stringbuf__morph_into_string(svn_stringbuf_t *strbuf); +/** Utility macro to define static svn_string_t objects. @a value must + * be a static string; the "" in the macro declaration tries to ensure this. + * + * Usage: + * static const svn_string_t my_string = SVN__STATIC_STRING("my text"); + */ +#define SVN__STATIC_STRING(value) { value "", sizeof(value "") - 1 } + /** Like strtoul but with a fixed base of 10 and without overflow checks. * This allows the compiler to generate massively faster (4x on 64bit LINUX) * code. Overflow checks may be added on the caller side where you might -- cgit v1.2.3