|
|
@ -17,6 +17,14 @@ struct item_type_vtable
|
|
|
|
int size;
|
|
|
|
int size;
|
|
|
|
void (*free)( struct collection it, void* item );
|
|
|
|
void (*free)( struct collection it, void* item );
|
|
|
|
int (*compare)( struct collection it, void* a, void* b );
|
|
|
|
int (*compare)( struct collection it, void* a, void* b );
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
Should return:
|
|
|
|
|
|
|
|
-1 when a < b
|
|
|
|
|
|
|
|
1 when a > b
|
|
|
|
|
|
|
|
0 when a = b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Same as strcmp
|
|
|
|
|
|
|
|
*/
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
struct collection
|
|
|
|
struct collection
|
|
|
|