util/blob: Clarify rules on blob::data

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15028>
This commit is contained in:
Connor Abbott 2022-02-15 12:29:56 +01:00 committed by Marge Bot
parent 6761550357
commit c21065c87a
1 changed files with 4 additions and 1 deletions

View File

@ -47,7 +47,10 @@ extern "C" {
*/
struct blob {
/* The data actually written to the blob. */
/* The data actually written to the blob. Never read or write this directly
* when serializing, use blob_reserve_* and blob_overwrite_* instead which
* check for out_of_memory and handle fixed-size blobs correctly.
*/
uint8_t *data;
/** Number of bytes that have been allocated for \c data. */