Mercurial > pidgin
comparison libgaim/stringref.h @ 14926:500a8f54354e
[gaim-migrate @ 17698]
Add extern "C" guards to header files which are missing it. This should fix problems similar to SF Bug #1592175. Also, while I was at it, I made the _GaimStringref definition private. It already had a warning to not use it directly, so it should really be safe to make private.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Tue, 07 Nov 2006 20:40:22 +0000 |
parents | 60b1bc8dbf37 |
children |
comparison
equal
deleted
inserted
replaced
14925:8d9a473bbab9 | 14926:500a8f54354e |
---|---|
24 * | 24 * |
25 */ | 25 */ |
26 #ifndef _GAIM_STRINGREF_H_ | 26 #ifndef _GAIM_STRINGREF_H_ |
27 #define _GAIM_STRINGREF_H_ | 27 #define _GAIM_STRINGREF_H_ |
28 | 28 |
29 /** | 29 #ifdef __cplusplus |
30 * The internal representation of a stringref. | 30 extern "C" { |
31 * | 31 #endif |
32 * @note For this structure to be useful, the string contained within | 32 |
33 * it must be immutable -- for this reason, do _not_ access it | 33 typedef struct _GaimStringref GaimStringref; |
34 * directly! | |
35 */ | |
36 typedef struct _GaimStringref { | |
37 guint32 ref; /**< The reference count of this string. | |
38 * Note that reference counts are only | |
39 * 31 bits, and the high-order bit | |
40 * indicates whether this string is up | |
41 * for GC at the next idle handler... | |
42 * But you aren't going to touch this | |
43 * anyway, right? */ | |
44 char value[1]; /**< The string contained in this ref. | |
45 * Notice that it is simply "hanging | |
46 * off the end" of the ref ... this | |
47 * is to save an allocation. */ | |
48 } GaimStringref; | |
49 | 34 |
50 /** | 35 /** |
51 * Creates an immutable reference-counted string object. The newly | 36 * Creates an immutable reference-counted string object. The newly |
52 * created object will have a reference count of 1. | 37 * created object will have a reference count of 1. |
53 * | 38 * |
141 * | 126 * |
142 * @return The length of the string in stringref | 127 * @return The length of the string in stringref |
143 */ | 128 */ |
144 size_t gaim_stringref_len(const GaimStringref *stringref); | 129 size_t gaim_stringref_len(const GaimStringref *stringref); |
145 | 130 |
131 #ifdef __cplusplus | |
132 } | |
133 #endif | |
134 | |
146 #endif /* _GAIM_STRINGREF_H_ */ | 135 #endif /* _GAIM_STRINGREF_H_ */ |