comparison libgaim/stringref.c @ 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
29 #include <string.h> 29 #include <string.h>
30 #include <stdarg.h> 30 #include <stdarg.h>
31 31
32 #include "debug.h" 32 #include "debug.h"
33 #include "stringref.h" 33 #include "stringref.h"
34
35 /**
36 * The internal representation of a stringref.
37 *
38 * @note For this structure to be useful, the string contained within
39 * it must be immutable -- for this reason, do _not_ access it
40 * directly!
41 */
42 struct _GaimStringref {
43 guint32 ref; /**< The reference count of this string.
44 * Note that reference counts are only
45 * 31 bits, and the high-order bit
46 * indicates whether this string is up
47 * for GC at the next idle handler...
48 * But you aren't going to touch this
49 * anyway, right? */
50 char value[1]; /**< The string contained in this ref.
51 * Notice that it is simply "hanging
52 * off the end" of the ref ... this
53 * is to save an allocation. */
54 };
34 55
35 #define REFCOUNT(x) ((x) & 0x7fffffff) 56 #define REFCOUNT(x) ((x) & 0x7fffffff)
36 57
37 static GList *gclist = NULL; 58 static GList *gclist = NULL;
38 59