remove ArrayDummySize with unchecked arrays (#5818)
This commit is contained in:
parent
b2aae477d1
commit
22684370b0
11 changed files with 25 additions and 28 deletions
|
|
@ -132,7 +132,7 @@ translated into a C array of undetermined size:
|
|||
|
||||
.. code-block:: nim
|
||||
type
|
||||
ArrayPart{.unchecked.} = array[0..0, int]
|
||||
ArrayPart{.unchecked.} = array[0, int]
|
||||
MySeq = object
|
||||
len, cap: int
|
||||
data: ArrayPart
|
||||
|
|
@ -146,10 +146,6 @@ Produces roughly this C code:
|
|||
NI data[];
|
||||
} MySeq;
|
||||
|
||||
The bounds checking done at compile time is not disabled for now, so to access
|
||||
``s.data[C]`` (where ``C`` is a constant) the array's index needs to
|
||||
include ``C``.
|
||||
|
||||
The base type of the unchecked array may not contain any GC'ed memory but this
|
||||
is currently not checked.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue