We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f71dd6 commit e299860Copy full SHA for e299860
src/core/c-handle.c
@@ -52,6 +52,8 @@
52
53
if (!sym) return 0;
54
55
+ //printf("Register_Handle: %s with size %u\n", SYMBOL_TO_NAME(sym), size);
56
+
57
idx = Find_Handle_Index(sym);
58
if (idx) Crash(RP_HANDLE_ALREADY_REGISTERED);
59
idx = VAL_TAIL(handles) + 1;
@@ -60,8 +62,8 @@
60
62
REBVAL *val = Append_Value(VAL_SERIES(handles));
61
63
Set_Word(val, sym, 0, 0);
64
- PG_Handles[idx].size = size;
- PG_Handles[idx].free = free_func;
65
+ PG_Handles[idx-1].size = size;
66
+ PG_Handles[idx-1].free = free_func;
67
68
return idx;
69
}
@@ -85,6 +87,7 @@
85
87
spec = PG_Handles[idx-1];
86
88
size = spec.size;
89
90
+ //printf("Requested HOB for %s of size %u\n", SYMBOL_TO_NAME(sym), size);
91
hob = (REBHOB*)Make_Node(HOB_POOL);
92
hob->data = MAKE_MEM(size);
93
hob->index = idx;
0 commit comments