Skip to content

Commit

Permalink
Revert "fixes #19000 (#19032)"
Browse files Browse the repository at this point in the history
This reverts commit 2bda4a3.
  • Loading branch information
ringabout committed Oct 8, 2022
1 parent e83f27e commit 3f78947
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions lib/system/memalloc.nim
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,6 @@ when hasAlloc and not defined(js):
##
## See also:
## * `create <#create,typedesc>`_
static:
when sizeof(T) <= 0:
{.fatal: "createU does not support types T where sizeof(T) == 0".}
cast[ptr T](alloc(T.sizeof * size))

template alloc0*(size: Natural): pointer =
Expand All @@ -144,9 +141,6 @@ when hasAlloc and not defined(js):
##
## The allocated memory belongs to its allocating thread!
## Use `createShared <#createShared,typedesc>`_ to allocate from a shared heap.
static:
when sizeof(T) <= 0:
{.fatal: "create does not support types T where sizeof(T) == 0".}
cast[ptr T](alloc0(sizeof(T) * size))

template realloc*(p: pointer, newSize: Natural): pointer =
Expand Down

0 comments on commit 3f78947

Please sign in to comment.