destructors: preparations for upcoming changes
This commit is contained in:
parent
7ee825a6e5
commit
45d74f4081
8 changed files with 27 additions and 8 deletions
|
|
@ -292,6 +292,13 @@ when defined(nimArrIdx):
|
|||
proc `[]=`*[I: Ordinal;T,S](a: T; i: I;
|
||||
x: S) {.noSideEffect, magic: "ArrPut".}
|
||||
proc `=`*[T](dest: var T; src: T) {.noSideEffect, magic: "Asgn".}
|
||||
when defined(nimNewRuntime):
|
||||
template `=destroy`*[T](x: var T) =
|
||||
## generic `destructor`:idx: implementation that can be overriden.
|
||||
discard
|
||||
template `=sink`*[T](x: var T; y: T) =
|
||||
## generic `sink`:idx: implementation that can be overriden.
|
||||
shallowCopy(x, y)
|
||||
|
||||
type
|
||||
Slice*[T] = object ## builtin slice type
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue