Modified: MacRuby/trunk/ext/zlib/zlib.c (4404 => 4405)
--- MacRuby/trunk/ext/zlib/zlib.c 2010-08-04 08:31:33 UTC (rev 4404)
+++ MacRuby/trunk/ext/zlib/zlib.c 2010-08-04 20:53:09 UTC (rev 4405)
@@ -1103,12 +1103,14 @@
static VALUE
rb_deflate_s_deflate(VALUE klass, SEL sel, int argc, VALUE *argv)
{
- struct zstream *z = (struct zstream*)zstream_deflate_new(klass);
+ struct zstream *z;
VALUE src, level, dst, args[2];
int err, lev;
rb_scan_args(argc, argv, "11", &src, &level);
+ z = (struct zstream *)xmalloc(sizeof(struct zstream));
+
lev = ARG_LEVEL(level);
StringValue(src);
src = rb_str_bstr(src);