comparison libpurple/value.c @ 32672:3828a61c44da

A boring and large patch so I can merge heads.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Fri, 23 Dec 2011 08:21:58 +0000
parents 647684cdbbac
children
comparison
equal deleted inserted replaced
32671:0e69949b3e61 32672:3828a61c44da
27 27
28 #include "value.h" 28 #include "value.h"
29 29
30 #define OUTGOING_FLAG 0x01 30 #define OUTGOING_FLAG 0x01
31 31
32 /**
33 * A wrapper for a type, subtype, and specific type of value.
34 */
35 struct _PurpleValue
36 {
37 PurpleType type;
38 unsigned short flags;
39
40 union
41 {
42 char char_data;
43 unsigned char uchar_data;
44 gboolean boolean_data;
45 short short_data;
46 unsigned short ushort_data;
47 int int_data;
48 unsigned int uint_data;
49 long long_data;
50 unsigned long ulong_data;
51 gint64 int64_data;
52 guint64 uint64_data;
53 char *string_data;
54 void *object_data;
55 void *pointer_data;
56 int enum_data;
57 void *boxed_data;
58
59 } data;
60
61 union
62 {
63 unsigned int subtype;
64 char *specific_type;
65
66 } u;
67
68 };
69
32 PurpleValue * 70 PurpleValue *
33 purple_value_new(PurpleType type, ...) 71 purple_value_new(PurpleType type, ...)
34 { 72 {
35 PurpleValue *value; 73 PurpleValue *value;
36 va_list args; 74 va_list args;