commit 284e76635399152995c605f3dd640d4ac99488da from: Stefan Sperling date: Fri Oct 15 09:21:46 2021 UTC remove unused internal raw object API functions commit - d3c116bf7268bde4ceb3311eb4ed995fc4776487 commit + 284e76635399152995c605f3dd640d4ac99488da blob - 0379a4f0e0a95fc21aceea4e5fa496a9073e2043 blob + 9550b434026142279a5994c04041865d05256b60 --- lib/got_lib_object.h +++ lib/got_lib_object.h @@ -109,11 +109,6 @@ const struct got_error *got_object_open(struct got_obj struct got_repository *, struct got_object_id *); const struct got_error *got_object_raw_open(struct got_raw_object **, int *, struct got_repository *, struct got_object_id *, size_t); -void got_object_raw_rewind(struct got_raw_object *); -size_t got_object_raw_get_hdrlen(struct got_raw_object *); -const uint8_t *got_object_raw_get_read_buf(struct got_raw_object *); -const struct got_error * got_object_raw_read_block(size_t *, - struct got_raw_object *); const struct got_error *got_object_raw_close(struct got_raw_object *); const struct got_error *got_object_open_by_id_str(struct got_object **, struct got_repository *, const char *); blob - f8bff2f3fbb380407255d04ff28571cbb1084c6d blob + 753da5d9b64bbbf173cc7d4a8207194ce7e4fbc1 --- lib/object.c +++ lib/object.c @@ -641,38 +641,7 @@ done: return err; } -void -got_object_raw_rewind(struct got_raw_object *obj) -{ - if (obj->f) - rewind(obj->f); -} - -size_t -got_object_raw_get_hdrlen(struct got_raw_object *obj) -{ - return obj->hdrlen; -} - -const uint8_t * -got_object_raw_get_read_buf(struct got_raw_object *obj) -{ - return obj->read_buf; -} - const struct got_error * -got_object_raw_read_block(size_t *outlenp, struct got_raw_object *obj) -{ - size_t n; - - n = fread(obj->read_buf, 1, obj->blocksize, obj->f); - if (n == 0 && ferror(obj->f)) - return got_ferror(obj->f, GOT_ERR_IO); - *outlenp = n; - return NULL; -} - -const struct got_error * got_object_open_by_id_str(struct got_object **obj, struct got_repository *repo, const char *id_str) {