Debian Codegraph @

subprojects/libcdvar-1/src/c-dvar-type.h

raw
1 #pragma once
2
3 /*
4 * D-Bus Variant Compile-time Type Compilation
5 *
6 * This header provides pre-processor macros to compile types into a CDVarType
7 * array at compile-time. That is, it performs the same task as
8 * c_dvar_type_new_from_string(), but at compile time. Furthermore, it can be
9 * used to access all kinds of type information, as long as the type-definition
10 * is compile-time constant.
11 *
12 * Unfortunately, it is not possible to tokenize string literals via the
13 * pre-processor. Hence, type definitions must be given explicit, rather than
14 * as type-string. For instance, the type "(yqut)" can be created via:
15 *
16 * C_DVAR_T_TUPLE4(
17 * C_DVAR_T_y,
18 * C_DVAR_T_q,
19 * C_DVAR_T_u,
20 * C_DVAR_T_t
21 * )
22 *
23 * For "better" readability, this file uses a bunch of internal macros. Those
24 * are prefixed with C_DVAR_TI*_. Do not use them directly! All macros that are
25 * API are exposed with the prefix C_DVAR_T_*().
26 *
27 * We represent a type as a pre-processor tuple, containing the following
28 * elements:
29 *
30 * 1) fixed-size type
31 * 2) alignment
32 * 3) type string
33 * 4) type length
34 * 5) basic type
35 * 6) array initializer
36 *
37 * IOW, the tuple contains all the fields of the CDVarType structure, plus an
38 * initializer to create such a type. Note that the 'element' field is replaced
39 * with the type-string, since that is more useful.
40 */
41
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45
46 #include <c-dvar.h>
47
48 /*
49 * Strip paranthesis from a tuple.
50 *
51 * Usage:
52 * C_DVAR_TI_EXPAND((A, B, C, D, E, F)) -> A, B, C, D, E, F
53 */
54 #define C_DVAR_TI_EXPAND(_x) C_DVAR_TII_EXPAND _x
55 #define C_DVAR_TII_EXPAND(...) __VA_ARGS__
56
57 /*
58 * Evaluate and then concatenate two symbols.
59 *
60 * Usage:
61 * C_DVAR_TI_CONCATENATE(FOOBAR_, __COUNTER__) -> FOOBAR_5
62 */
63 #define C_DVAR_TI_CONCATENATE(_a, _b) C_DVAR_TII_CONCATENATE(_a, _b)
64 #define C_DVAR_TII_CONCATENATE(_a, _b) _a ## _b
65
66 /*
67 * Select a specific tuple member. We do not assert on the tuple size, but
68 * rather allow any finite tuple to be used.
69 *
70 * Usage:
71 * C_DVAR_TI_SELECT(3, (A, B, C, D, E, F)) -> C
72 */
73 #define C_DVAR_TI_SELECT_1(_1, ...) _1
74 #define C_DVAR_TI_SELECT_2(_1, _2, ...) _2
75 #define C_DVAR_TI_SELECT_3(_1, _2, _3, ...) _3
76 #define C_DVAR_TI_SELECT_4(_1, _2, _3, _4, ...) _4
77 #define C_DVAR_TI_SELECT_5(_1, _2, _3, _4, _5, ...) _5
78 #define C_DVAR_TI_SELECT_6(_1, _2, _3, _4, _5, _6, ...) _6
79 #define C_DVAR_TI_SELECT(_which, _set) C_DVAR_TI_CONCATENATE(C_DVAR_TI_SELECT_, _which) _set
80
81 /*
82 * Create a pre-processor type for builtins.
83 *
84 * Usage:
85 * C_DVAR_TI_BUILTIN(u) -> Type-tuple for builtin type 'u'
86 */
87 #define C_DVAR_TI_BUILTIN(_char) C_DVAR_TII_BUILTIN(C_DVAR_TI_CONCATENATE(C_DVAR_TYPE_, _char), _char)
88 #define C_DVAR_TII_BUILTIN(_set, _char) ( \
89 C_DVAR_TI_SELECT(1, _set), \
90 C_DVAR_TI_SELECT(2, _set), \
91 # _char, \
92 C_DVAR_TI_SELECT(4, _set), \
93 C_DVAR_TI_SELECT(5, _set), \
94 ({ \
95 .size = C_DVAR_TI_SELECT(1, _set), \
96 .alignment = C_DVAR_TI_SELECT(2, _set), \
97 .element = C_DVAR_TI_SELECT(3, _set), \
98 .length = C_DVAR_TI_SELECT(4, _set), \
99 .basic = C_DVAR_TI_SELECT(5, _set), \
100 }) \
101 )
102
103 /*
104 * Create array-type given its embedded type.
105 *
106 * Usage:
107 * C_DVAR_TI_ARRAY(C_DVAR_T_u) -> Type: au
108 */
109 #define C_DVAR_TI_ARRAY(_type) ( \
110 0, \
111 2, \
112 "a" C_DVAR_TI_SELECT(3, _type), \
113 C_DVAR_TI_SELECT(4, _type) + 1, \
114 0, \
115 ( \
116 { \
117 .size = 0, \
118 .alignment = 2, \
119 .element = 'a', \
120 .length = C_DVAR_TI_SELECT(4, _type) + 1, \
121 .basic = 0, \
122 }, \
123 C_DVAR_TI_EXPAND(C_DVAR_TI_SELECT(6, _type)) \
124 ) \
125 )
126
127 /*
128 * Calculate tuple-size, suitable as callback for fold().
129 *
130 * Usage:
131 * C_DVAR_TI_TUPLE_SIZE(7, C_DVAR_T_u) -> 12
132 */
133 #define C_DVAR_TI_TUPLE_SIZE(_size, _next) ( \
134 ( \
135 ( \
136 ( \
137 (_size) + \
138 (1 << C_DVAR_TI_SELECT(2, _next)) - \
139 1 \
140 ) & \
141 ~( \
142 (1 << C_DVAR_TI_SELECT(2, _next)) - \
143 1 \
144 ) \
145 ) + \
146 C_DVAR_TI_SELECT(1, _next) \
147 ) * \
148 !!(_size) * \
149 !!C_DVAR_TI_SELECT(1, _next) \
150 )
151
152 /*
153 * Append another type to a tuple.
154 *
155 * Usage:
156 * C_DVAR_TI_TUPLE_APPEND(MY_TYPE, C_DVAR_T_u)
157 */
158 #define C_DVAR_TI_TUPLE_APPEND(_set, _next) ( \
159 C_DVAR_TI_TUPLE_SIZE( \
160 C_DVAR_TI_SELECT(1, _set), \
161 _next \
162 ), \
163 0, \
164 C_DVAR_TI_SELECT(3, _set) C_DVAR_TI_SELECT(3, _next), \
165 C_DVAR_TI_SELECT(4, _set) + C_DVAR_TI_SELECT(4, _next), \
166 0, \
167 ( \
168 C_DVAR_TI_EXPAND(C_DVAR_TI_SELECT(6, _set)), \
169 C_DVAR_TI_EXPAND(C_DVAR_TI_SELECT(6, _next)) \
170 ) \
171 )
172
173 /*
174 * Closure for a dynamic tuple. Any tuple can be created with nested
175 * C_DVAR_TI_TUPLE_APPEND. However, those calls must be wrapped in a
176 * C_DVAR_TI_TUPLE invocation to add tuple closure state.
177 *
178 * Usage:
179 * C_DVAR_TI_TUPLE(
180 * C_DVAR_TI_TUPLE_APPEND(
181 * C_DVAR_TI_TUPLE_APPEND(
182 * C_DVAR_T_y,
183 * C_DVAR_T_q
184 * ),
185 * C_DVAR_T_u
186 * ),
187 * '(', "(", ')', ")"
188 * ) -> Type: (yqu)
189 */
190 #define C_DVAR_TI_TUPLE(_set, _open1, _open2, _close1, _close2) ( \
191 C_DVAR_TI_SELECT(1, _set), \
192 3, \
193 _open2 C_DVAR_TI_SELECT(3, _set) _close2, \
194 C_DVAR_TI_SELECT(4, _set) + 2, \
195 0, \
196 ( \
197 { \
198 .size = C_DVAR_TI_SELECT(1, _set), \
199 .alignment = 3, \
200 .element = _open1, \
201 .length = C_DVAR_TI_SELECT(4, _set) + 2, \
202 .basic = 0, \
203 }, \
204 C_DVAR_TI_EXPAND(C_DVAR_TI_SELECT(6, _set)), \
205 { \
206 .size = 0, \
207 .alignment = 0, \
208 .element = _close1, \
209 .length = 1, \
210 .basic = 0, \
211 } \
212 ) \
213 )
214
215 /**
216 * C_DVAR_T_SIZE(): Return fixed size of a type
217 * C_DVAR_T_ALIGNMENT(): Return alignment of a type
218 * C_DVAR_T_SIGNATURE(): Return signature of a type
219 * C_DVAR_T_LENGTH(): Return length of a type
220 * C_DVAR_T_BASIC(): Return whether a type is basic
221 * C_DVAR_T_INIT(): Return CDVarType initializer of a type
222 */
223 #define C_DVAR_T_SIZE(_type) C_DVAR_TI_SELECT(1, _type)
224 #define C_DVAR_T_ALIGNMENT(_type) C_DVAR_TI_SELECT(2, _type)
225 #define C_DVAR_T_SIGNATURE(_type) C_DVAR_TI_SELECT(3, _type)
226 #define C_DVAR_T_LENGTH(_type) C_DVAR_TI_SELECT(4, _type)
227 #define C_DVAR_T_BASIC(_type) C_DVAR_TI_SELECT(5, _type)
228 #define C_DVAR_T_INIT(_type) C_DVAR_TI_EXPAND(C_DVAR_TI_SELECT(6, _type))
229
230 /**
231 * C_DVAR_T_?: Builtin types
232 *
233 * This macro exists for all single-character builtin types, and other common
234 * compound types. It evaluates to their pre-processor representation. Use the
235 * type-accessors to get access to specific fields.
236 */
237 #define C_DVAR_T_y C_DVAR_TI_BUILTIN(y)
238 #define C_DVAR_T_b C_DVAR_TI_BUILTIN(b)
239 #define C_DVAR_T_n C_DVAR_TI_BUILTIN(n)
240 #define C_DVAR_T_q C_DVAR_TI_BUILTIN(q)
241 #define C_DVAR_T_i C_DVAR_TI_BUILTIN(i)
242 #define C_DVAR_T_u C_DVAR_TI_BUILTIN(u)
243 #define C_DVAR_T_x C_DVAR_TI_BUILTIN(x)
244 #define C_DVAR_T_t C_DVAR_TI_BUILTIN(t)
245 #define C_DVAR_T_h C_DVAR_TI_BUILTIN(h)
246 #define C_DVAR_T_d C_DVAR_TI_BUILTIN(d)
247 #define C_DVAR_T_s C_DVAR_TI_BUILTIN(s)
248 #define C_DVAR_T_o C_DVAR_TI_BUILTIN(o)
249 #define C_DVAR_T_g C_DVAR_TI_BUILTIN(g)
250 #define C_DVAR_T_v C_DVAR_TI_BUILTIN(v)
251
252 /**
253 * C_DVAR_T_ARRAY(): XXX
254 */
255 #define C_DVAR_T_ARRAY(_type) \
256 C_DVAR_TI_ARRAY(_type)
257
258 /**
259 * C_DVAR_T_PAIR(): XXX
260 */
261 #define C_DVAR_T_PAIR(_key, _value) \
262 C_DVAR_TI_TUPLE(C_DVAR_TI_TUPLE_APPEND(_key, _value), '{',"{", '}', "}")
263
264 /**
265 * C_DVAR_T_TUPLE(): XXX
266 */
267 #define C_DVAR_T_TUPLE(_type) \
268 C_DVAR_TI_TUPLE(_type, '(', "(", ')', ")")
269
270 /**
271 * C_DVAR_T_TUPLE_APPEND(): XXX
272 */
273 #define C_DVAR_T_TUPLE_APPEND(_set, _next) \
274 C_DVAR_TI_TUPLE_APPEND(_set, _next)
275
276 /**
277 * C_DVAR_T_TUPLE0: XXX
278 */
279 #define C_DVAR_T_TUPLE0 ( \
280 0, \
281 3, \
282 "()", \
283 2, \
284 0, \
285 ( \
286 { \
287 .size = 0, \
288 .alignment = 3, \
289 .element = '(', \
290 .length = 2, \
291 .basic = 0, \
292 }, \
293 { \
294 .size = 0, \
295 .alignment = 0, \
296 .element = ')', \
297 .length = 1, \
298 .basic = 0, \
299 } \
300 ) \
301 )
302
303 /**
304 * C_DVAR_T_TUPLE1(): XXX
305 */
306 #define C_DVAR_T_TUPLE1(_type1) \
307 C_DVAR_T_TUPLE(_type1)
308
309 /**
310 * C_DVAR_T_TUPLE2(): XXX
311 */
312 #define C_DVAR_T_TUPLE2(_type1, _type_l) \
313 C_DVAR_T_TUPLE( \
314 C_DVAR_T_TUPLE_APPEND( \
315 _type1, \
316 _type_l) \
317 )
318
319 /**
320 * C_DVAR_T_TUPLE3(): XXX
321 */
322 #define C_DVAR_T_TUPLE3(_type1, _type2, _type_l) \
323 C_DVAR_T_TUPLE( \
324 C_DVAR_T_TUPLE_APPEND( \
325 C_DVAR_T_TUPLE_APPEND( \
326 _type1, \
327 _type2), \
328 _type_l) \
329 )
330
331 /**
332 * C_DVAR_T_TUPLE4(): XXX
333 */
334 #define C_DVAR_T_TUPLE4(_type1, _type2, _type3, _type_l) \
335 C_DVAR_T_TUPLE( \
336 C_DVAR_T_TUPLE_APPEND( \
337 C_DVAR_T_TUPLE_APPEND( \
338 C_DVAR_T_TUPLE_APPEND( \
339 _type1, \
340 _type2), \
341 _type3), \
342 _type_l) \
343 )
344
345 /**
346 * C_DVAR_T_TUPLE5(): XXX
347 */
348 #define C_DVAR_T_TUPLE5(_type1, _type2, _type3, _type4, _type_l) \
349 C_DVAR_T_TUPLE( \
350 C_DVAR_T_TUPLE_APPEND( \
351 C_DVAR_T_TUPLE_APPEND( \
352 C_DVAR_T_TUPLE_APPEND( \
353 C_DVAR_T_TUPLE_APPEND( \
354 _type1, \
355 _type2), \
356 _type3), \
357 _type4), \
358 _type_l) \
359 )
360
361 /**
362 * C_DVAR_T_TUPLE6(): XXX
363 */
364 #define C_DVAR_T_TUPLE6(_type1, _type2, _type3, _type4, _type5, _type_l) \
365 C_DVAR_T_TUPLE( \
366 C_DVAR_T_TUPLE_APPEND( \
367 C_DVAR_T_TUPLE_APPEND( \
368 C_DVAR_T_TUPLE_APPEND( \
369 C_DVAR_T_TUPLE_APPEND( \
370 C_DVAR_T_TUPLE_APPEND( \
371 _type1, \
372 _type2), \
373 _type3), \
374 _type4), \
375 _type5), \
376 _type_l) \
377 )
378
379 /**
380 * C_DVAR_T_TUPLE7(): XXX
381 */
382 #define C_DVAR_T_TUPLE7(_type1, _type2, _type3, _type4, _type5, _type6, _type_l) \
383 C_DVAR_T_TUPLE( \
384 C_DVAR_T_TUPLE_APPEND( \
385 C_DVAR_T_TUPLE_APPEND( \
386 C_DVAR_T_TUPLE_APPEND( \
387 C_DVAR_T_TUPLE_APPEND( \
388 C_DVAR_T_TUPLE_APPEND( \
389 C_DVAR_T_TUPLE_APPEND( \
390 _type1, \
391 _type2), \
392 _type3), \
393 _type4), \
394 _type5), \
395 _type6), \
396 _type_l) \
397 )
398
399 /**
400 * C_DVAR_T_TUPLE8(): XXX
401 */
402 #define C_DVAR_T_TUPLE8(_type1, _type2, _type3, _type4, _type5, _type6, _type7, _type_l) \
403 C_DVAR_T_TUPLE( \
404 C_DVAR_T_TUPLE_APPEND( \
405 C_DVAR_T_TUPLE_APPEND( \
406 C_DVAR_T_TUPLE_APPEND( \
407 C_DVAR_T_TUPLE_APPEND( \
408 C_DVAR_T_TUPLE_APPEND( \
409 C_DVAR_T_TUPLE_APPEND( \
410 C_DVAR_T_TUPLE_APPEND( \
411 _type1, \
412 _type2), \
413 _type3), \
414 _type4), \
415 _type5), \
416 _type6), \
417 _type7), \
418 _type_l) \
419 )
420
421 /**
422 * C_DVAR_T_TUPLE9(): XXX
423 */
424 #define C_DVAR_T_TUPLE9(_type1, _type2, _type3, _type4, _type5, _type6, _type7, _type8, _type_l) \
425 C_DVAR_T_TUPLE( \
426 C_DVAR_T_TUPLE_APPEND( \
427 C_DVAR_T_TUPLE_APPEND( \
428 C_DVAR_T_TUPLE_APPEND( \
429 C_DVAR_T_TUPLE_APPEND( \
430 C_DVAR_T_TUPLE_APPEND( \
431 C_DVAR_T_TUPLE_APPEND( \
432 C_DVAR_T_TUPLE_APPEND( \
433 C_DVAR_T_TUPLE_APPEND( \
434 _type1, \
435 _type2), \
436 _type3), \
437 _type4), \
438 _type5), \
439 _type6), \
440 _type7), \
441 _type8), \
442 _type_l) \
443 )
444
445 /**
446 * C_DVAR_T_TUPLE10(): XXX
447 */
448 #define C_DVAR_T_TUPLE10(_type1, _type2, _type3, _type4, _type5, _type6, _type7, _type8, _type9, _type_l) \
449 C_DVAR_T_TUPLE( \
450 C_DVAR_T_TUPLE_APPEND( \
451 C_DVAR_T_TUPLE_APPEND( \
452 C_DVAR_T_TUPLE_APPEND( \
453 C_DVAR_T_TUPLE_APPEND( \
454 C_DVAR_T_TUPLE_APPEND( \
455 C_DVAR_T_TUPLE_APPEND( \
456 C_DVAR_T_TUPLE_APPEND( \
457 C_DVAR_T_TUPLE_APPEND( \
458 C_DVAR_T_TUPLE_APPEND( \
459 _type1, \
460 _type2), \
461 _type3), \
462 _type4), \
463 _type5), \
464 _type6), \
465 _type7), \
466 _type8), \
467 _type9), \
468 _type_l) \
469 )
470
471 /**
472 * C_DVAR_T_TUPLE11(): XXX
473 */
474 #define C_DVAR_T_TUPLE11(_type1, _type2, _type3, _type4, _type5, _type6, _type7, _type8, _type9, _type10, _type_l) \
475 C_DVAR_T_TUPLE( \
476 C_DVAR_T_TUPLE_APPEND( \
477 C_DVAR_T_TUPLE_APPEND( \
478 C_DVAR_T_TUPLE_APPEND( \
479 C_DVAR_T_TUPLE_APPEND( \
480 C_DVAR_T_TUPLE_APPEND( \
481 C_DVAR_T_TUPLE_APPEND( \
482 C_DVAR_T_TUPLE_APPEND( \
483 C_DVAR_T_TUPLE_APPEND( \
484 C_DVAR_T_TUPLE_APPEND( \
485 C_DVAR_T_TUPLE_APPEND( \
486 _type1, \
487 _type2), \
488 _type3), \
489 _type4), \
490 _type5), \
491 _type6), \
492 _type7), \
493 _type8), \
494 _type9), \
495 _type10), \
496 _type_l) \
497 )
498
499 /**
500 * C_DVAR_T_TUPLE12(): XXX
501 */
502 #define C_DVAR_T_TUPLE12( \
503 _type1, _type2, _type3, _type4, \
504 _type5, _type6, _type7, _type8, \
505 _type9, _type10, _type11, _type_l \
506 ) \
507 C_DVAR_T_TUPLE( \
508 C_DVAR_T_TUPLE_APPEND( \
509 C_DVAR_T_TUPLE_APPEND( \
510 C_DVAR_T_TUPLE_APPEND( \
511 C_DVAR_T_TUPLE_APPEND( \
512 C_DVAR_T_TUPLE_APPEND( \
513 C_DVAR_T_TUPLE_APPEND( \
514 C_DVAR_T_TUPLE_APPEND( \
515 C_DVAR_T_TUPLE_APPEND( \
516 C_DVAR_T_TUPLE_APPEND( \
517 C_DVAR_T_TUPLE_APPEND( \
518 C_DVAR_T_TUPLE_APPEND( \
519 _type1, \
520 _type2), \
521 _type3), \
522 _type4), \
523 _type5), \
524 _type6), \
525 _type7), \
526 _type8), \
527 _type9), \
528 _type10), \
529 _type11), \
530 _type_l) \
531 )
532
533 /**
534 * C_DVAR_T_TUPLE13(): XXX
535 */
536 #define C_DVAR_T_TUPLE13( \
537 _type1, _type2, _type3, _type4, \
538 _type5, _type6, _type7, _type8, \
539 _type9, _type10, _type11, _type12, \
540 _type_l \
541 ) \
542 C_DVAR_T_TUPLE( \
543 C_DVAR_T_TUPLE_APPEND( \
544 C_DVAR_T_TUPLE_APPEND( \
545 C_DVAR_T_TUPLE_APPEND( \
546 C_DVAR_T_TUPLE_APPEND( \
547 C_DVAR_T_TUPLE_APPEND( \
548 C_DVAR_T_TUPLE_APPEND( \
549 C_DVAR_T_TUPLE_APPEND( \
550 C_DVAR_T_TUPLE_APPEND( \
551 C_DVAR_T_TUPLE_APPEND( \
552 C_DVAR_T_TUPLE_APPEND( \
553 C_DVAR_T_TUPLE_APPEND( \
554 C_DVAR_T_TUPLE_APPEND( \
555 _type1, \
556 _type2), \
557 _type3), \
558 _type4), \
559 _type5), \
560 _type6), \
561 _type7), \
562 _type8), \
563 _type9), \
564 _type10), \
565 _type11), \
566 _type12), \
567 _type_l) \
568 )
569
570 /**
571 * C_DVAR_T_TUPLE14(): XXX
572 */
573 #define C_DVAR_T_TUPLE14( \
574 _type1, _type2, _type3, _type4, \
575 _type5, _type6, _type7, _type8, \
576 _type9, _type10, _type11, _type12, \
577 _type13, _type_l \
578 ) \
579 C_DVAR_T_TUPLE( \
580 C_DVAR_T_TUPLE_APPEND( \
581 C_DVAR_T_TUPLE_APPEND( \
582 C_DVAR_T_TUPLE_APPEND( \
583 C_DVAR_T_TUPLE_APPEND( \
584 C_DVAR_T_TUPLE_APPEND( \
585 C_DVAR_T_TUPLE_APPEND( \
586 C_DVAR_T_TUPLE_APPEND( \
587 C_DVAR_T_TUPLE_APPEND( \
588 C_DVAR_T_TUPLE_APPEND( \
589 C_DVAR_T_TUPLE_APPEND( \
590 C_DVAR_T_TUPLE_APPEND( \
591 C_DVAR_T_TUPLE_APPEND( \
592 C_DVAR_T_TUPLE_APPEND( \
593 _type1, \
594 _type2), \
595 _type3), \
596 _type4), \
597 _type5), \
598 _type6), \
599 _type7), \
600 _type8), \
601 _type9), \
602 _type10), \
603 _type11), \
604 _type12), \
605 _type13), \
606 _type_l) \
607 )
608
609 /**
610 * C_DVAR_T_TUPLE15(): XXX
611 */
612 #define C_DVAR_T_TUPLE15( \
613 _type1, _type2, _type3, _type4, \
614 _type5, _type6, _type7, _type8, \
615 _type9, _type10, _type11, _type12, \
616 _type13, _type14, _type_l \
617 ) \
618 C_DVAR_T_TUPLE( \
619 C_DVAR_T_TUPLE_APPEND( \
620 C_DVAR_T_TUPLE_APPEND( \
621 C_DVAR_T_TUPLE_APPEND( \
622 C_DVAR_T_TUPLE_APPEND( \
623 C_DVAR_T_TUPLE_APPEND( \
624 C_DVAR_T_TUPLE_APPEND( \
625 C_DVAR_T_TUPLE_APPEND( \
626 C_DVAR_T_TUPLE_APPEND( \
627 C_DVAR_T_TUPLE_APPEND( \
628 C_DVAR_T_TUPLE_APPEND( \
629 C_DVAR_T_TUPLE_APPEND( \
630 C_DVAR_T_TUPLE_APPEND( \
631 C_DVAR_T_TUPLE_APPEND( \
632 C_DVAR_T_TUPLE_APPEND( \
633 _type1, \
634 _type2), \
635 _type3), \
636 _type4), \
637 _type5), \
638 _type6), \
639 _type7), \
640 _type8), \
641 _type9), \
642 _type10), \
643 _type11), \
644 _type12), \
645 _type13), \
646 _type14), \
647 _type_l) \
648 )
649
650 /**
651 * C_DVAR_T_TUPLE16(): XXX
652 */
653 #define C_DVAR_T_TUPLE16( \
654 _type1, _type2, _type3, _type4, \
655 _type5, _type6, _type7, _type8, \
656 _type9, _type10, _type11, _type12, \
657 _type13, _type14, _type15, _type_l \
658 ) \
659 C_DVAR_T_TUPLE( \
660 C_DVAR_T_TUPLE_APPEND( \
661 C_DVAR_T_TUPLE_APPEND( \
662 C_DVAR_T_TUPLE_APPEND( \
663 C_DVAR_T_TUPLE_APPEND( \
664 C_DVAR_T_TUPLE_APPEND( \
665 C_DVAR_T_TUPLE_APPEND( \
666 C_DVAR_T_TUPLE_APPEND( \
667 C_DVAR_T_TUPLE_APPEND( \
668 C_DVAR_T_TUPLE_APPEND( \
669 C_DVAR_T_TUPLE_APPEND( \
670 C_DVAR_T_TUPLE_APPEND( \
671 C_DVAR_T_TUPLE_APPEND( \
672 C_DVAR_T_TUPLE_APPEND( \
673 C_DVAR_T_TUPLE_APPEND( \
674 C_DVAR_T_TUPLE_APPEND( \
675 _type1, \
676 _type2), \
677 _type3), \
678 _type4), \
679 _type5), \
680 _type6), \
681 _type7), \
682 _type8), \
683 _type9), \
684 _type10), \
685 _type11), \
686 _type12), \
687 _type13), \
688 _type14), \
689 _type15), \
690 _type_l) \
691 )
692
693 #ifdef __cplusplus
694 }
695 #endif