summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/compile.c b/compile.c
index 1159a9d21e..a4328d03fa 100644
--- a/compile.c
+++ b/compile.c
@@ -9721,12 +9721,13 @@ static VALUE
pinned_list_new(long size)
{
struct pinned_list * ptr;
+ VALUE obj_list =
+ TypedData_Make_Struct(0, struct pinned_list, &pinned_list_type, ptr);
- ptr = xmalloc(sizeof(struct pinned_list));
- ptr->size = size;
ptr->buffer = xcalloc(size, sizeof(VALUE));
+ ptr->size = size;
- return TypedData_Wrap_Struct(0, &pinned_list_type, ptr);
+ return obj_list;
}
static ibf_offset_t