diff options
author | Elliot Waite <elliot@elliotwaite.com> | 2020-12-14 11:13:12 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-14 20:13:12 +0100 |
commit | f3d57761abc425f546985af407f178d71db20b78 (patch) | |
tree | 36925f3cf4bc1b94fa93c58c969f40be60d462fa /lib/system | |
parent | e843492b1334ded1d8fcd0e0eb6dc94fcf970aba (diff) | |
download | Nim-f3d57761abc425f546985af407f178d71db20b78.tar.gz |
Fix broken links in docs (#16336)
* Fix broken links in docs * Fix rand HSlice links
Diffstat (limited to 'lib/system')
-rw-r--r-- | lib/system/assertions.nim | 2 | ||||
-rw-r--r-- | lib/system/memalloc.nim | 24 |
2 files changed, 13 insertions, 13 deletions
diff --git a/lib/system/assertions.nim b/lib/system/assertions.nim index 1a4fda123..4c25d2a56 100644 --- a/lib/system/assertions.nim +++ b/lib/system/assertions.nim @@ -48,7 +48,7 @@ template assert*(cond: untyped, msg = "") = ## ## The compiler may not generate any code at all for ``assert`` if it is ## advised to do so through the ``-d:danger`` or ``--assertions:off`` - ## `command line switches <nimc.html#compiler-usage-command-line-switches>`_. + ## `command line switches <nimc.html#compiler-usage-commandminusline-switches>`_. ## ## .. code-block:: nim ## static: assert 1 == 9, "This assertion generates code when not built with -d:danger or --assertions:off" diff --git a/lib/system/memalloc.nim b/lib/system/memalloc.nim index 5f4304502..f5e8b2363 100644 --- a/lib/system/memalloc.nim +++ b/lib/system/memalloc.nim @@ -77,16 +77,16 @@ when hasAlloc and not defined(js): template alloc*(size: Natural): pointer = ## Allocates a new memory block with at least ``size`` bytes. ## - ## The block has to be freed with `realloc(block, 0) <#realloc,pointer,Natural>`_ + ## The block has to be freed with `realloc(block, 0) <#realloc.t,pointer,Natural>`_ ## or `dealloc(block) <#dealloc,pointer>`_. ## The block is not initialized, so reading ## from it before writing to it is undefined behaviour! ## ## The allocated memory belongs to its allocating thread! - ## Use `allocShared <#allocShared,Natural>`_ to allocate from a shared heap. + ## Use `allocShared <#allocShared.t,Natural>`_ to allocate from a shared heap. ## ## See also: - ## * `alloc0 <#alloc0,Natural>`_ + ## * `alloc0 <#alloc0.t,Natural>`_ incStat(allocCount) allocImpl(size) @@ -108,13 +108,13 @@ when hasAlloc and not defined(js): template alloc0*(size: Natural): pointer = ## Allocates a new memory block with at least ``size`` bytes. ## - ## The block has to be freed with `realloc(block, 0) <#realloc,pointer,Natural>`_ + ## The block has to be freed with `realloc(block, 0) <#realloc.t,pointer,Natural>`_ ## or `dealloc(block) <#dealloc,pointer>`_. ## The block is initialized with all bytes containing zero, so it is - ## somewhat safer than `alloc <#alloc,Natural>`_. + ## somewhat safer than `alloc <#alloc.t,Natural>`_. ## ## The allocated memory belongs to its allocating thread! - ## Use `allocShared0 <#allocShared0,Natural>`_ to allocate from a shared heap. + ## Use `allocShared0 <#allocShared0.t,Natural>`_ to allocate from a shared heap. incStat(allocCount) alloc0Impl(size) @@ -140,7 +140,7 @@ when hasAlloc and not defined(js): ## `dealloc(block) <#dealloc,pointer>`_. ## ## The allocated memory belongs to its allocating thread! - ## Use `reallocShared <#reallocShared,pointer,Natural>`_ to reallocate + ## Use `reallocShared <#reallocShared.t,pointer,Natural>`_ to reallocate ## from a shared heap. reallocImpl(p, newSize) @@ -157,7 +157,7 @@ when hasAlloc and not defined(js): ## somewhat safer then realloc ## ## The allocated memory belongs to its allocating thread! - ## Use `reallocShared <#reallocShared,pointer,Natural>`_ to reallocate + ## Use `reallocShared <#reallocShared.t,pointer,Natural>`_ to reallocate ## from a shared heap. realloc0Impl(p, oldSize, newSize) @@ -193,14 +193,14 @@ when hasAlloc and not defined(js): ## least ``size`` bytes. ## ## The block has to be freed with - ## `reallocShared(block, 0) <#reallocShared,pointer,Natural>`_ + ## `reallocShared(block, 0) <#reallocShared.t,pointer,Natural>`_ ## or `deallocShared(block) <#deallocShared,pointer>`_. ## ## The block is not initialized, so reading from it before writing ## to it is undefined behaviour! ## ## See also: - ## `allocShared0 <#allocShared0,Natural>`_. + ## `allocShared0 <#allocShared0.t,Natural>`_. incStat(allocCount) allocSharedImpl(size) @@ -225,12 +225,12 @@ when hasAlloc and not defined(js): ## least ``size`` bytes. ## ## The block has to be freed with - ## `reallocShared(block, 0) <#reallocShared,pointer,Natural>`_ + ## `reallocShared(block, 0) <#reallocShared.t,pointer,Natural>`_ ## or `deallocShared(block) <#deallocShared,pointer>`_. ## ## The block is initialized with all bytes ## containing zero, so it is somewhat safer than - ## `allocShared <#allocShared,Natural>`_. + ## `allocShared <#allocShared.t,Natural>`_. incStat(allocCount) allocShared0Impl(size) |