commit 0af444f5444a6b3b062b6613bbaf4e6d44c6c25c from: Stefan Sperling via: Thomas Adam date: Fri Oct 15 19:22:03 2021 UTC remove unused internal raw object API functions commit - 8ab9215ce40afc9580a77aacb351ad235c4482c2 commit + 0af444f5444a6b3b062b6613bbaf4e6d44c6c25c 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 - 930a91152a078a290df1b0e9f96edd8d66b45d64 blob + a6900432a89dcb070e53a9eb4dc3d7580fb28724 --- 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) {