diff --git a/clib/clib.go b/clib/clib.go index e8319ae..5769ed0 100644 --- a/clib/clib.go +++ b/clib/clib.go @@ -66,14 +66,6 @@ static inline xmlError* MY_xmlCtxtLastError(void *ctx) { return (xmlError*) xmlCtxtGetLastError(ctx); } -// Change xmlIndentTreeOutput global, return old value, so caller can -// change it back to old value later -static inline int MY_setXmlIndentTreeOutput(int i) { - int old = xmlIndentTreeOutput; - xmlIndentTreeOutput = i; - return old; -} - // Parse a single char out of cur // Stolen from XML::LibXML static inline int @@ -1079,13 +1071,7 @@ func XMLToString(n PtrSource, format int, _ bool) string { buffer := C.xmlBufferCreate() defer C.xmlBufferFree(buffer) - if format <= 0 { - C.xmlNodeDump(buffer, nptr.doc, nptr, 0, 0) - } else { - oIndentTreeOutput := C.MY_setXmlIndentTreeOutput(1) - C.xmlNodeDump(buffer, nptr.doc, nptr, 0, C.int(format)) - C.MY_setXmlIndentTreeOutput(oIndentTreeOutput) - } + C.xmlNodeDump(buffer, nptr.doc, nptr, 0, C.int(format)) return xmlCharToString(C.xmlBufferContent(buffer)) }