Mercurial > pidgin
diff 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 |
line wrap: on
line diff
--- a/libgaim/stringref.h Tue Nov 07 19:54:02 2006 +0000 +++ b/libgaim/stringref.h Tue Nov 07 20:40:22 2006 +0000 @@ -26,26 +26,11 @@ #ifndef _GAIM_STRINGREF_H_ #define _GAIM_STRINGREF_H_ -/** - * The internal representation of a stringref. - * - * @note For this structure to be useful, the string contained within - * it must be immutable -- for this reason, do _not_ access it - * directly! - */ -typedef struct _GaimStringref { - guint32 ref; /**< The reference count of this string. - * Note that reference counts are only - * 31 bits, and the high-order bit - * indicates whether this string is up - * for GC at the next idle handler... - * But you aren't going to touch this - * anyway, right? */ - char value[1]; /**< The string contained in this ref. - * Notice that it is simply "hanging - * off the end" of the ref ... this - * is to save an allocation. */ -} GaimStringref; +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct _GaimStringref GaimStringref; /** * Creates an immutable reference-counted string object. The newly @@ -143,4 +128,8 @@ */ size_t gaim_stringref_len(const GaimStringref *stringref); +#ifdef __cplusplus +} +#endif + #endif /* _GAIM_STRINGREF_H_ */