make parsexml compatible with --gc:destructors/newruntime

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

View File

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