mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
compiler/blob: Make some parameters void instead of uint8_t
There are certain advantages to using uint8_t internally such as well-defined arithmetic on all platforms. However, interfaces that work in terms of raw data should use a void* type. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
parent
4d56ff0a71
commit
6a41a52e62
2 changed files with 5 additions and 5 deletions
|
|
@ -238,7 +238,7 @@ blob_write_string(struct blob *blob, const char *str)
|
|||
}
|
||||
|
||||
void
|
||||
blob_reader_init(struct blob_reader *blob, const uint8_t *data, size_t size)
|
||||
blob_reader_init(struct blob_reader *blob, const void *data, size_t size)
|
||||
{
|
||||
blob->data = data;
|
||||
blob->end = blob->data + size;
|
||||
|
|
@ -280,9 +280,9 @@ blob_read_bytes(struct blob_reader *blob, size_t size)
|
|||
}
|
||||
|
||||
void
|
||||
blob_copy_bytes(struct blob_reader *blob, uint8_t *dest, size_t size)
|
||||
blob_copy_bytes(struct blob_reader *blob, void *dest, size_t size)
|
||||
{
|
||||
const uint8_t *bytes;
|
||||
const void *bytes;
|
||||
|
||||
bytes = blob_read_bytes(blob, size);
|
||||
if (bytes == NULL)
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@ blob_write_string(struct blob *blob, const char *str);
|
|||
* current value is unchanged before and after the call.
|
||||
*/
|
||||
void
|
||||
blob_reader_init(struct blob_reader *blob, const uint8_t *data, size_t size);
|
||||
blob_reader_init(struct blob_reader *blob, const void *data, size_t size);
|
||||
|
||||
/**
|
||||
* Read some unstructured, fixed-size data from the current location, (and
|
||||
|
|
@ -292,7 +292,7 @@ blob_read_bytes(struct blob_reader *blob, size_t size);
|
|||
* it to \dest (and update the current location to just past this data)
|
||||
*/
|
||||
void
|
||||
blob_copy_bytes(struct blob_reader *blob, uint8_t *dest, size_t size);
|
||||
blob_copy_bytes(struct blob_reader *blob, void *dest, size_t size);
|
||||
|
||||
/**
|
||||
* Read a uint32_t from the current location, (and update the current location
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue