summaryrefslogtreecommitdiff
path: root/struct.c
diff options
context:
space:
mode:
authorMatt Valentine-House <[email protected]>2023-06-12 13:13:32 +0100
committerJean Boussier <[email protected]>2023-06-12 16:20:05 +0200
commit6fe46ff967215e47ab2234e9b48663d2e3608081 ()
tree9c0c73d916c070a2e6b89265736aa0620ee283ff /struct.c
parent31e24a42f3c351fc306147b08fb7442d272d39f8 (diff)
When alloc size is too large, only allocate struct
Notes: Merged: https://.com/ruby/ruby/pull/7933
-rw-r--r--struct.c2
1 files changed, 1 insertions, 1 deletions
@@ -849,7 +849,7 @@ struct_alloc(VALUE klass)
return (VALUE)st;
}
else {
- NEWOBJ_OF(st, struct RStruct, klass, flags, embedded_size, 0);
st->as.heap.ptr = struct_heap_alloc((VALUE)st, n);
rb_mem_clear((VALUE *)st->as.heap.ptr, n);