Skip to content

Commit d15705e

Browse files
authored
fixes usenimrtl with useMalloc (#24804)
Follow up #19512 ref #24794 Otherwise, `/Users/blue/Desktop/Nim/lib/system/mm/malloc.nim(4, 1) Error: redefinition of 'allocImpl'; previous declaration here: /Users/blue/Desktop/Nim/lib/system/memalloc.nim(51, 8)` In `proc allocImpl*(size: Natural): pointer {.noconv, rtl, tags: [], benign, raises: [].}`, `rtl` means it is an `importc` function instead of a proc forward decl.
1 parent 0b9ed84 commit d15705e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/system/mmdisp.nim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ elif defined(gogc):
5555
include system / mm / go
5656

5757
elif (defined(nogc) or defined(gcDestructors)) and defined(useMalloc):
58-
include system / mm / malloc
58+
when not defined(useNimRtl):
59+
include system / mm / malloc
5960

6061
when defined(nogc):
6162
proc GC_getStatistics(): string = ""

0 commit comments

Comments
 (0)