fix: Make minitar_read_contents() take a const pointer to entry
This commit is contained in:
parent
912b98d2d7
commit
27dac123f4
@ -51,7 +51,7 @@ extern "C"
|
||||
int minitar_find_by_name(struct minitar* mp, const char* name, struct minitar_entry* out);
|
||||
int minitar_find_by_path(struct minitar* mp, const char* path, struct minitar_entry* out);
|
||||
int minitar_find_any_of(struct minitar* mp, enum minitar_file_type type, struct minitar_entry* out);
|
||||
size_t minitar_read_contents(struct minitar* mp, struct minitar_entry* entry, char* buf, size_t max);
|
||||
size_t minitar_read_contents(struct minitar* mp, const struct minitar_entry* entry, char* buf, size_t max);
|
||||
int minitar_close(struct minitar* mp);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -111,7 +111,7 @@ int minitar_find_any_of(struct minitar* mp, enum minitar_file_type type, struct
|
||||
return -1;
|
||||
}
|
||||
|
||||
size_t minitar_read_contents(struct minitar* mp, struct minitar_entry* entry, char* buf, size_t max)
|
||||
size_t minitar_read_contents(struct minitar* mp, const struct minitar_entry* entry, char* buf, size_t max)
|
||||
{
|
||||
if (!max) return 0;
|
||||
if (!entry->metadata.size) return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user