2 #include "shotgun/lib/shotgun.h"
3 #include "shotgun/lib/tuple.h"
5 OBJECT
tuple_enlarge(STATE
, OBJECT tup
, int inc
) {
9 if(tup
->gc_zone
== YoungObjectZone
) {
10 ns
= tuple_new(state
, sz
+ inc
);
12 ns
= NEW_OBJECT_MATURE(state
->global
->tuple
, sz
+ inc
);
14 object_copy_fields_from(state
, tup
, ns
, 0, sz
);
18 OBJECT
tuple_dup(STATE
, OBJECT tup
) {
21 ns
= tuple_new(state
, NUM_FIELDS(tup
));
22 object_copy_fields_from(state
, tup
, ns
, 0, NUM_FIELDS(tup
));
27 OBJECT
tuple_new2(STATE
, int n
, ...) {
32 tup
= tuple_new(state
, n
);
35 for(i
= 0; i
< n
; i
++) {
36 tuple_put(state
, tup
, i
, va_arg(ar
, OBJECT
));