fixes #9754 [backport] (#15342)

This commit is contained in:
Andreas Rumpf 2020-09-16 19:41:14 +02:00 • committed by GitHub
commit 8b66412a8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -327,10 +327,7 @@ proc setPointer*(x: Any, y: pointer) =
## ``akString``, ``akCString``, ``akProc``, ``akRef``, ``akPtr``,
## ``akPointer``, ``akSequence``.
assert x.rawType.kind in pointerLike
when defined(gcDestructors):
genericAssign(x.value, y, x.rawType)
else:
cast[ppointer](x.value)[] = y
genericAssign(x.value, y, x.rawType)
proc fieldsAux(p: pointer, n: ptr TNimNode,
ret: var seq[tuple[name: cstring, any: Any]]) =