Example #1
0
int
ht_inc_int_from_str_key (GHashTable * ht, char *key, int inc)
{
  if (ht == NULL)
    return (EINVAL);

  return ht_inc_int_from_key (ht, key, inc);
}
Example #2
0
int
ht_inc_int_from_str_key (TCADB * adb, const char *key, int inc)
{
  if (adb == NULL)
    return (EINVAL);

  return ht_inc_int_from_key (adb, key, strlen (key), inc);
}
Example #3
0
int
ht_inc_int_from_int_key (TCADB * adb, int data_nkey, int inc)
{
  if (adb == NULL)
    return (EINVAL);

  return ht_inc_int_from_key (adb, &data_nkey, sizeof (data_nkey), inc);
}
Example #4
0
int
ht_inc_int_from_int_key (GHashTable * ht, int data_nkey, int inc)
{
  int ret, *key;
  if (ht == NULL)
    return (EINVAL);

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

  return ret;
}