111
111
/* Hard-code the base types in a constant array */
112
112
static const GVariantTypeInfo g_variant_type_info_basic_table[24] = {
113
113
#define fixed_aligned(x) x, x - 1
114
#define not_a_type 0,
114
115
#define unaligned 0, 0
115
116
#define aligned(x) 0, x - 1
116
117
/* 'b' */ { fixed_aligned(1) }, /* boolean */
118
/* 'c' */ { not_a_type },
118
119
/* 'd' */ { fixed_aligned(8) }, /* double */
120
/* 'e' */ { not_a_type },
121
/* 'f' */ { not_a_type },
121
122
/* 'g' */ { unaligned }, /* signature string */
122
123
/* 'h' */ { fixed_aligned(4) }, /* file handle (int32) */
123
124
/* 'i' */ { fixed_aligned(4) }, /* int32 */
125
/* 'j' */ { not_a_type },
126
/* 'k' */ { not_a_type },
127
/* 'l' */ { not_a_type },
128
/* 'm' */ { not_a_type },
128
129
/* 'n' */ { fixed_aligned(2) }, /* int16 */
129
130
/* 'o' */ { unaligned }, /* object path string */
131
/* 'p' */ { not_a_type },
131
132
/* 'q' */ { fixed_aligned(2) }, /* uint16 */
133
/* 'r' */ { not_a_type },
133
134
/* 's' */ { unaligned }, /* string */
134
135
/* 't' */ { fixed_aligned(8) }, /* uint64 */
135
136
/* 'u' */ { fixed_aligned(4) }, /* uint32 */
136
137
/* 'v' */ { aligned(8) }, /* variant */
138
/* 'w' */ { not_a_type },
138
139
/* 'x' */ { fixed_aligned(8) }, /* int64 */
139
140
/* 'y' */ { fixed_aligned(1) }, /* byte */
140
141
#undef fixed_aligned