X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=vector%2FTuple.c;h=e5341bd1a807a1ae298630b4d5e964d28e39139b;hb=4e5a12ca4bfd6541fac14c1b0fa0d6e12168ce88;hp=06eba85778e4e654623aa1c0ca869af9c2e6b84a;hpb=3d4400773c3361961bcb9f8b6898321f2005a093;p=rrq%2Frrqmisc.git diff --git a/vector/Tuple.c b/vector/Tuple.c index 06eba85..e5341bd 100644 --- a/vector/Tuple.c +++ b/vector/Tuple.c @@ -3,6 +3,13 @@ #include #include +Tuple *Tuple_calloc(int arity) { + Tuple *t = (Tuple *) malloc( sizeof( Tuple ) + arity * sizeof( void* ) ); + t->types = 0; + memset( t->elements, 0, arity * sizeof( void* ) ); + return t; +} + // Allocate Tuple *Tuple_create(int arity,...) { va_list ap; @@ -23,6 +30,7 @@ Tuple *Tuple_clone(int arity,Tuple *t) { return ct; } +#if 0 unsigned long Tuple_mask(int arity,Tuple *t) { unsigned long mask = 0; while ( arity-- > 0 ) { @@ -33,3 +41,4 @@ unsigned long Tuple_mask(int arity,Tuple *t) { } return mask; } +#endif