From 03ce08c47b78438589deb40ad024fcbfa5a75445 Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Wed, 8 Jun 2016 20:30:32 +0800 Subject: [PATCH] no *mem proc's for JS --- lib/system.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/system.nim b/lib/system.nim index d29974a2ad..370a270b68 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -1594,7 +1594,7 @@ proc substr*(s: string, first, last: int): string {. ## is used instead: This means ``substr`` can also be used to `cut`:idx: ## or `limit`:idx: a string's length. -when not defined(nimscript): +when not defined(nimscript) and not defined(JS): proc zeroMem*(p: pointer, size: Natural) {.inline, benign.} ## overwrites the contents of the memory at ``p`` with the value 0. ## Exactly ``size`` bytes will be overwritten. Like any procedure @@ -1619,6 +1619,7 @@ when not defined(nimscript): ## otherwise. Like any procedure dealing with raw memory this is ## *unsafe*. +when not defined(nimscript): when hasAlloc: proc alloc*(size: Natural): pointer {.noconv, rtl, tags: [], benign.} ## allocates a new memory block with at least ``size`` bytes. The