jcs
/subtext
/amendments
/184
bile: ids are unsigned long, not size_t (even though they're the same)
jcs made amendment 184 over 2 years ago
--- bile.c Sat Jun 11 19:59:05 2022
+++ bile.c Thu Jul 7 17:02:07 2022
@@ -301,11 +301,12 @@ bile_count_by_type(struct bile *bile, const OSType typ
}
size_t
-bile_sorted_ids_by_type(struct bile *bile, const OSType type, size_t **ret)
+bile_sorted_ids_by_type(struct bile *bile, const OSType type,
+ unsigned long **ret)
{
struct bile_object *o;
size_t count = 0, size = 0, n, j, t;
- size_t *ids;
+ unsigned long *ids;
bile_check_sanity(bile);
@@ -334,7 +335,7 @@ bile_sorted_ids_by_type(struct bile *bile, const OSTyp
}
struct bile_object *
-bile_get_nth_of_type(struct bile *bile, const size_t index,
+bile_get_nth_of_type(struct bile *bile, const unsigned long index,
const OSType type)
{
struct bile_object *o, *ocopy;
@@ -360,11 +361,12 @@ bile_get_nth_of_type(struct bile *bile, const size_t i
return NULL;
}
-size_t
+unsigned long
bile_next_id(struct bile *bile, const OSType type)
{
struct bile_object *o;
- size_t n, id = 1;
+ size_t n;
+ unsigned long id = 1;
unsigned long highest;
bile_check_sanity(bile);
--- bile.h Sat Jun 11 20:00:38 2022
+++ bile.h Thu Jul 7 17:00:42 2022
@@ -114,10 +114,10 @@ struct bile_object * bile_find(struct bile *bile, cons
size_t bile_count_by_type(struct bile *bile,
const OSType type);
size_t bile_sorted_ids_by_type(struct bile *bile,
- const OSType type, size_t **ret);
+ const OSType type, unsigned long **ret);
struct bile_object * bile_get_nth_of_type(struct bile *bile,
- const size_t index, const OSType type);
-size_t bile_next_id(struct bile *bile, const OSType type);
+ const unsigned long index, const OSType type);
+unsigned long bile_next_id(struct bile *bile, const OSType type);
short bile_delete(struct bile *bile, const OSType type,
const unsigned long id);
size_t bile_read_object(struct bile *bile,