/* Returns: the data element corresponding to the string, or NULL if it is not found.  */
gpointer g_dataset_id_get_data(gconstpointer dataset_location, GQuark key_id)
/* Returns: the data element corresponding to the string, or NULL if it is not found.  */
gpointer g_dataset_id_get_data(gconstpointer dataset_location, GQuark key_id)
{
  gpointer retval = NULL;
  g_return_val_if_fail (dataset_location != NULL, NULL);
  G_LOCK (g_dataset_global);
  if (key_id && g_dataset_location_ht)
    {
      GDataset *dataset;
      dataset = g_dataset_lookup (dataset_location);
      if (dataset)
	retval = g_datalist_id_get_data (&dataset->datalist, key_id);
    }
  G_UNLOCK (g_dataset_global);
  return retval;
}