conditional TGenericSeq extension

This commit is contained in:
Stefan Talpalaru
2015-06-16 15:15:17 +02:00
parent 8624654c57
commit b487d4e425
3 changed files with 18 additions and 8 deletions

View File

@@ -67,12 +67,16 @@ type
pbyteArray = ptr array[0.. 0xffff, int8]
TGenericSeq {.importc.} = object
len, space, elemSize: int
len, space: int
when defined(gogc):
elemSize: int
PGenSeq = ptr TGenericSeq
{.deprecated: [TAny: Any, TAnyKind: AnyKind].}
const
GenericSeqSize = (3 * sizeof(int))
when defined(gogc):
const GenericSeqSize = (3 * sizeof(int))
else:
const GenericSeqSize = (2 * sizeof(int))
proc genericAssign(dest, src: pointer, mt: PNimType) {.importCompilerProc.}
proc genericShallowAssign(dest, src: pointer, mt: PNimType) {.