+
+ rb_ary_clear (stream); /* give the GC a hand... */
+
+ chunk = rb_class_new_instance (2, args, cChunk);
+
+ return rb_funcall (chunk, id_serialize, 0);
+}
+
+static VALUE
+int_to_eet_chunks (int argc, VALUE *argv, VALUE self)
+{
+ VALUE tag, type = Qnil, ary, args[2], chunk;
+ char *cfmt = "V";
+
+ rb_scan_args (argc, argv, "11", &tag, &type);
+
+ ary = rb_ary_new3 (1, self);
+
+ if (type == sym_char)
+ cfmt = "c";
+ else if (type == sym_short)
+ cfmt = "v";
+ else if (type == sym_long_long)
+ cfmt = "q";
+
+ args[0] = tag;
+ args[1] = rb_funcall (ary, id_pack, 1, rb_str_new2 (cfmt));