7 Tuple *Tuple_calloc(unsigned long arity) {
8 Tuple *t = (Tuple *) malloc( sizeof( Tuple ) + arity * sizeof( void* ) );
10 memset( t->elements, 0, arity * sizeof( void* ) );
14 // Allocate with values
15 Tuple *Tuple_create(int arity,...) {
18 Tuple *t = (Tuple *) malloc( sizeof( Tuple ) + arity * sizeof( void* ) );
20 va_start( ap, arity );
21 for ( i = 0; i < arity; i++ ) {
22 t->elements[i] = va_arg( ap, void* );
29 Tuple *Tuple_clone(Tuple *t) {
30 unsigned long size = t->size * sizeof( void* );
31 Tuple *ct = (Tuple *) malloc( sizeof( Tuple ) + size );
32 memcpy( ct, t, size );