mtime=(p1)
public
Specify the modification time (mtime) in the gzip header. Using a
Fixnum or Integer
Show source
static VALUE
rb_gzfile_set_mtime(VALUE obj, VALUE mtime)
{
struct gzfile *gz = get_gzfile(obj);
VALUE val;
if (gz->z.flags & GZFILE_FLAG_HEADER_FINISHED) {
rb_raise(cGzError, "header is already written");
}
if (FIXNUM_P(mtime)) {
gz->mtime = FIX2INT(mtime);
}
else {
val = rb_Integer(mtime);
gz->mtime = FIXNUM_P(val) ? FIX2UINT(val) : rb_big2ulong(val);
}
return mtime;
}