make parsexml compatible with --gc:destructors/newruntime

This commit is contained in:
Andreas Rumpf 2019-11-07 18:04:28 +01:00
commit 135e945ff0

View file

@ -299,7 +299,7 @@ template piRest*(my: XmlParser): string =
assert(my.kind == xmlPI) assert(my.kind == xmlPI)
my.b my.b
proc rawData*(my: XmlParser): string {.inline.} = proc rawData*(my: var XmlParser): string {.inline.} =
## returns the underlying 'data' string by reference. ## returns the underlying 'data' string by reference.
## This is only used for speed hacks. ## This is only used for speed hacks.
when defined(gcDestructors): when defined(gcDestructors):
@ -307,7 +307,7 @@ proc rawData*(my: XmlParser): string {.inline.} =
else: else:
shallowCopy(result, my.a) shallowCopy(result, my.a)
proc rawData2*(my: XmlParser): string {.inline.} = proc rawData2*(my: var XmlParser): string {.inline.} =
## returns the underlying second 'data' string by reference. ## returns the underlying second 'data' string by reference.
## This is only used for speed hacks. ## This is only used for speed hacks.
when defined(gcDestructors): when defined(gcDestructors):