Commit 284e76635399152995c605f3dd640d4ac99488da

Stefan Sperling 2021-10-15T09:21:46

remove unused internal raw object API functions

diff --git a/lib/got_lib_object.h b/lib/got_lib_object.h
index 0379a4f..9550b43 100644
--- a/lib/got_lib_object.h
+++ b/lib/got_lib_object.h
@@ -109,11 +109,6 @@ const struct got_error *got_object_open(struct got_object **,
     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 *);
diff --git a/lib/object.c b/lib/object.c
index f8bff2f..753da5d 100644
--- a/lib/object.c
+++ b/lib/object.c
@@ -641,37 +641,6 @@ 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)