Next: , Previous: Autobuf allocation, Up: Automatic buffers


11.3 Getting the status of an autobuf

— Function: int abuf_valid_p (const Autobuf *abuf)

Returns non-zero iff the memory referenced by abuf represents a valid autobuf.

— Function: ssize_t abuf_length (const Autobuf *abuf)

Returns the number of bytes stored in abuf.

— Function: unsigned char * abuf_data (const Autobuf *abuf)

Returns a pointer to the data contained in abuf. The pointer returned is only guaranteed to point to ‘abuf_length (abuf)’ characters. This pointer is valid only until the next call to a library function which may modify abuf.