summaryrefslogtreecommitdiff
path: root/struct.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-08-09 04:32:24 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-08-09 04:32:24 +0000
commitc1bbe10599dfcc2dca3823dc0784eb1835c1ed74 (patch)
treecf8d2904f1e9ba1a42b0e68e59571e97c3695f2b /struct.c
parenta3edeb5fec3dfb064a1745881f5c5ec68e2abc92 (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'struct.c')
-rw-r--r--struct.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/struct.c b/struct.c
index 977d411..31103a4 100644
--- a/struct.c
+++ b/struct.c
@@ -281,7 +281,6 @@ struct_alloc(argc, argv, klass)
size = iv_get(klass, "__size__");
n = FIX2LONG(size);
- st->len = 0; /* avoid GC crashing */
st->ptr = ALLOC_N(VALUE, n);
rb_mem_clear(st->ptr, n);
st->len = n;
@@ -408,7 +407,6 @@ rb_struct_clone(s)
{
NEWOBJ(clone, struct RStruct);
CLONESETUP(clone, s);
- clone->len = 0; /* avoid GC crashing */
clone->ptr = ALLOC_N(VALUE, RSTRUCT(s)->len);
clone->len = RSTRUCT(s)->len;
MEMCPY(clone->ptr, RSTRUCT(s)->ptr, VALUE, clone->len);