mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-05 11:24:08 +00:00
fixes usenimrtl with useMalloc (#24804)
Follow up https://github.com/nim-lang/Nim/pull/19512 ref https://github.com/nim-lang/Nim/issues/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.
This commit is contained in:
@@ -55,7 +55,8 @@ elif defined(gogc):
|
||||
include system / mm / go
|
||||
|
||||
elif (defined(nogc) or defined(gcDestructors)) and defined(useMalloc):
|
||||
include system / mm / malloc
|
||||
when not defined(useNimRtl):
|
||||
include system / mm / malloc
|
||||
|
||||
when defined(nogc):
|
||||
proc GC_getStatistics(): string = ""
|
||||
|
||||
Reference in New Issue
Block a user