Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
yui-knk committed May 29, 2023
1 parent 3996bf4 commit ad35213
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions st2.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ typedef st2_data_t st2_index_t;
/* Maximal value of unsigned integer type st2_index_t. */
#define MAX_ST2_INDEX_VAL (~(st2_index_t) 0)

typedef int st_compare_func(st2_data_t, st2_data_t);
typedef st2_index_t st_hash_func(st2_data_t);
typedef int st2_compare_func(st2_data_t, st2_data_t);
typedef st2_index_t st2_hash_func(st2_data_t);

typedef char st_check_for_sizeof_st2_index_t[SIZEOF_VOIDP == (int)sizeof(st2_index_t) ? 1 : -1];
#define SIZEOF_ST_INDEX_T SIZEOF_VOIDP

struct st2_hash_type {
int (*compare)(st2_data_t, st2_data_t); /* st_compare_func* */
st2_index_t (*hash)(st2_data_t); /* st_hash_func* */
int (*compare)(st2_data_t, st2_data_t); /* st2_compare_func* */
st2_index_t (*hash)(st2_data_t); /* st2_hash_func* */
};

typedef struct st_functions {
Expand Down

0 comments on commit ad35213

Please sign in to comment.