Cleanup: Use int8 type rather than char for buffer
Indicates that this is just a buffer with an element size of 8 bit, not a displayable/printable string buffer.
This commit is contained in:
parent
51791004ea
commit
fd22404837
|
@ -36,7 +36,9 @@ extern "C" {
|
|||
|
||||
extern const void *DNA_default_table[SDNA_TYPE_MAX];
|
||||
|
||||
char *_DNA_struct_default_alloc_impl(const char *data_src, size_t size, const char *alloc_str);
|
||||
uint8_t *_DNA_struct_default_alloc_impl(const uint8_t *data_src,
|
||||
size_t size,
|
||||
const char *alloc_str);
|
||||
|
||||
/**
|
||||
* Wrap with macro that casts correctly.
|
||||
|
|
|
@ -559,9 +559,11 @@ const void *DNA_default_table[SDNA_TYPE_MAX] = {
|
|||
#undef SDNA_DEFAULT_DECL
|
||||
#undef SDNA_DEFAULT_DECL_EX
|
||||
|
||||
char *_DNA_struct_default_alloc_impl(const char *data_src, size_t size, const char *alloc_str)
|
||||
uint8_t *_DNA_struct_default_alloc_impl(const uint8_t *data_src,
|
||||
size_t size,
|
||||
const char *alloc_str)
|
||||
{
|
||||
char *data_dst = MEM_mallocN(size, alloc_str);
|
||||
uint8_t *data_dst = MEM_mallocN(size, alloc_str);
|
||||
memcpy(data_dst, data_src, size);
|
||||
return data_dst;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue