From 50bdb0bb5577944a150dfae5cd6a6a47cbf30b1c Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sat, 14 Feb 2009 18:24:45 +0000 Subject: Add simple accessors for data and length svn path=/trunk/libwapcaplet/; revision=6509 --- include/libwapcaplet/libwapcaplet.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include') diff --git a/include/libwapcaplet/libwapcaplet.h b/include/libwapcaplet/libwapcaplet.h index ded5d58..c3b99ea 100644 --- a/include/libwapcaplet/libwapcaplet.h +++ b/include/libwapcaplet/libwapcaplet.h @@ -110,5 +110,21 @@ extern lwc_error lwc_context_string_caseless_isequal(lwc_context *ctx, lwc_string *str1, lwc_string *str2, bool *ret); +/** + * Retrieve the data pointer for an interned string. + * + * @note The data we point at belongs to the string and will + * die with the string. Keep a ref if you need it. + */ +extern const char *lwc_string_data(lwc_string *str); + +/** + * Retrieve the data length for an interned string. + * + * @note The data we point at belongs to the string and will + * die with the string. Keep a ref if you need it. + */ +extern size_t lwc_string_length(lwc_string *str); + #endif /* libwapcaplet_h_ */ -- cgit v1.2.3