7 Tuple *Tuple_create(int arity,...) {
10 Tuple *t = (Tuple *) malloc( sizeof( Tuple ) + arity * sizeof( void* ) );
11 t->types = 0; // unknown types
12 va_start( ap, arity );
13 for ( i = 0; i < arity; i++ ) {
14 t->elements[i] = va_arg( ap, void* );
20 Tuple *Tuple_clone(int arity,Tuple *t) {
21 Tuple *ct = (Tuple *)malloc( sizeof( Tuple ) + arity * sizeof( void* ) );
22 memcpy( ct, t, arity * sizeof( void* ) );
26 unsigned long Tuple_mask(int arity,Tuple *t) {
27 unsigned long mask = 0;
28 while ( arity-- > 0 ) {
30 if ( t->elements[ arity ] ) {