#include <string.h>
#include <Tuple.h>
+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;
return ct;
}
+#if 0
unsigned long Tuple_mask(int arity,Tuple *t) {
unsigned long mask = 0;
while ( arity-- > 0 ) {
}
return mask;
}
+#endif
void *elements[];
} Tuple;
-extern ItemKeyFun *Tuple_elementType(Tuple *t,unsigned long index);
-
/**
- * Create a tuples with given values.
+ * \brief Create an untyped tuple with given values.
*
- * \related TupleSchema
+ * \related Tuple
*/
extern Tuple *Tuple_create(int arity,...);
/**
- * \brief Create a tuples as a clone of a given tuple
+ * \brief Create an untyped tuple with 0 values.
*
- * \related TupleSchema
+ * \related Tuple
*/
-extern Tuple *Tuple_clone(int arity,Tuple *t);
+extern Tuple *Tuple_calloc(int arity);
+/**
+ * \brief Create a tuple as a clone of a given tuple.
+ *
+ * \related Tuple
+ */
+extern Tuple *Tuple_clone(int arity,Tuple *t);
#endif