diff options
author | Ben Gamari <ben@smart-cactus.org> | 2021-08-04 10:28:11 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2021-08-05 11:04:51 -0400 |
commit | 9122a7d09d9dc8858cd593d4a39642d8837719f4 (patch) | |
tree | 2984c0925c21cee4bacdb2862b0624ce424943c7 /rts/Heap.c | |
parent | 657ae4bfd7a6b65d9ad091f4d0305d66548810a3 (diff) | |
download | haskell-wip/T20199.tar.gz |
rts: Fix use of sized array in Heap.hwip/T20199
Sized arrays cannot be used in headers that might be imported from C++.
Fixes #20199.
Diffstat (limited to 'rts/Heap.c')
-rw-r--r-- | rts/Heap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rts/Heap.c b/rts/Heap.c index 627b91d5db..9f9154de27 100644 --- a/rts/Heap.c +++ b/rts/Heap.c @@ -77,7 +77,7 @@ void heap_view_closure_ptrs_in_pap_payload(StgClosure *ptrs[], StgWord *nptrs } // See Heap.h -StgWord collect_pointers(StgClosure *closure, StgWord size, StgClosure *ptrs[size]) { +StgWord collect_pointers(StgClosure *closure, StgClosure *ptrs[]) { StgClosure **end; const StgInfoTable *info = get_itbl(closure); StgWord nptrs = 0; @@ -250,7 +250,7 @@ StgMutArrPtrs *heap_view_closurePtrs(Capability *cap, StgClosure *closure) { // the closure and then we can allocate space on the heap and copy them // there StgClosure *ptrs[size]; - StgWord nptrs = collect_pointers(closure, size, ptrs); + StgWord nptrs = collect_pointers(closure, ptrs); size = nptrs + mutArrPtrsCardTableSize(nptrs); StgMutArrPtrs *arr = |