Eric Blake 9202f2c220 buf: support peeking at string contents
Right now, the only way to get at the contents of a virBuffer is
to destroy it.  But there are cases in my upcoming patches where
peeking at the contents makes life easier.  I suppose this does
open up the potential for bad code to dereference a stale pointer,
by disregarding the docs that the return value is invalid on the
next virBuf operation, but such is life.

* src/util/buf.h (virBufferCurrentContent): New declaration.
* src/util/buf.c (virBufferCurrentContent): Implement it.
* src/libvirt_private.syms (buf.h): Export it.
* tests/virbuftest.c (testBufAutoIndent): Test it.
2012-06-11 09:21:27 -06:00
..
2012-06-11 09:21:27 -06:00
2012-06-11 09:21:27 -06:00
2012-06-08 10:09:54 +02:00
2012-03-23 21:56:20 +08:00
2012-06-08 10:09:54 +02:00
2012-06-08 10:09:54 +02:00
2012-04-19 10:21:43 -04:00
2012-04-19 10:21:43 -04:00
2012-04-19 17:42:53 -06:00
2012-05-29 06:25:59 -04:00
2012-04-19 17:42:53 -06:00