MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlBufEmpty

Function xmlBufEmpty

ThirdParty/libxml2/vtklibxml2/buf.c:296–313  ·  view source on GitHub ↗

* xmlBufEmpty: * @buf: the buffer * * empty a buffer. */

Source from the content-addressed store, hash-verified

294 * empty a buffer.
295 */
296void
297xmlBufEmpty(xmlBufPtr buf) {
298 if ((buf == NULL) || (buf->error != 0)) return;
299 if (buf->content == NULL) return;
300 CHECK_COMPAT(buf)
301 buf->use = 0;
302 if ((buf->alloc == XML_BUFFER_ALLOC_IO) &&
303 (buf->contentIO != NULL)) {
304 size_t start_buf = buf->content - buf->contentIO;
305
306 buf->size += start_buf;
307 buf->content = buf->contentIO;
308 buf->content[0] = 0;
309 } else {
310 buf->content[0] = 0;
311 }
312 UPDATE_COMPAT(buf)
313}
314
315/**
316 * xmlBufShrink:

Callers 1

xmlTextReaderConstValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected