Пример #1
0
int
ht_inc_u64_from_str_key (TCADB * adb, const char *key, uint64_t inc)
{
  if (adb == NULL)
    return (EINVAL);

  return ht_inc_u64_from_key (adb, key, strlen (key), inc);
}
Пример #2
0
int
ht_inc_u64_from_int_key (TCADB * adb, int data_nkey, uint64_t inc)
{
  if (adb == NULL)
    return (EINVAL);

  return ht_inc_u64_from_key (adb, &data_nkey, sizeof (data_nkey), inc);
}
Пример #3
0
int
ht_inc_u64_from_int_key (GHashTable * ht, int data_nkey, uint64_t inc)
{
  int ret, *key;
  if (ht == NULL)
    return (EINVAL);

  key = int2ptr (data_nkey);
  if ((ret = ht_inc_u64_from_key (ht, key, inc)) != 0)
    free (key);

  return ret;
}