@@ -186,15 +186,23 @@ struct traceeval *traceeval_init(struct traceeval_type *keys,
void traceeval_release(struct traceeval *teval);
-int traceeval_insert(struct traceeval *teval,
- const struct traceeval_data *keys,
- const struct traceeval_data *vals);
+int traceeval_insert_size(struct traceeval *teval,
+ const struct traceeval_data *keys, size_t nr_keys,
+ const struct traceeval_data *vals, size_t nr_vals);
+
+#define traceeval_insert(teval, keys, vals) \
+ traceeval_insert_size(teval, keys, sizeof(keys) / sizeof(keys[0]), \
+ vals, sizeof(vals) / sizeof(vals[0]))
int traceeval_remove(struct traceeval *teval,
const struct traceeval_data *keys);
-int traceeval_query(struct traceeval *teval, const struct traceeval_data *keys,
- const struct traceeval_data **results);
+int traceeval_query_size(struct traceeval *teval, const struct traceeval_data *keys,
+ size_t nr_keys, const struct traceeval_data **results);
+
+#define traceeval_query(teval, keys, results) \
+ traceeval_query_size(teval, keys, \
+ sizeof(keys) / sizeof(keys[0]), results);
void traceeval_results_release(struct traceeval *teval,
const struct traceeval_data *results);
@@ -675,8 +675,8 @@ fail:
*
* Returns 1 if found, 0 if not found, and -1 on error.
*/
-int traceeval_query(struct traceeval *teval, const struct traceeval_data *keys,
- const struct traceeval_data **results)
+int traceeval_query_size(struct traceeval *teval, const struct traceeval_data *keys,
+ size_t nr_keys, const struct traceeval_data **results)
{
struct entry *entry;
int check;
@@ -928,9 +928,9 @@ unsigned long long traceeval_stat_count(struct traceeval_stat *stat)
*
* Returns 0 on success, and -1 on error.
*/
-int traceeval_insert(struct traceeval *teval,
- const struct traceeval_data *keys,
- const struct traceeval_data *vals)
+int traceeval_insert_size(struct traceeval *teval,
+ const struct traceeval_data *keys, size_t nr_keys,
+ const struct traceeval_data *vals, size_t nr_vals)
{
struct entry *entry;
int check;