************************************************************************ Before now, the Berkeley DB back end was supplied the DB_DBT_MALLOC flag and it became the caller's responsibility to handle any memory allocated and returned by cdb_fetch() and cdb_next_item(). These heuristics are not expected to be compatible with new back ends currently in planning. cdb_fetch() and cdb_next_item() now return data that is to be considered immutable (don't write to it or you'll segfault). The caller must still call cdb_free() to free the `struct cdbdata` itself, but the pointers inside it point to buffers that the back end will reuse. After a call to cdb_fetch() or cdb_next_item(), the buffers are guaranteed to be readable until the next call to one of those functions on the same table.

Reply via email to