remove unused internal raw object API functions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
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)