/* Returns: (transfer none): the #GParamSpec for the property, or NULL if the class doesn't have a property of that name  */
GParamSpec* g_object_class_find_property(GObjectClass *class, const gchar *property_name)
/* Returns: (transfer none): the #GParamSpec for the property, or NULL if the class doesn't have a property of that name  */
GParamSpec* g_object_class_find_property(GObjectClass *class, const gchar *property_name)
{
  GParamSpec *pspec;
  GParamSpec *redirect;
  g_return_val_if_fail (G_IS_OBJECT_CLASS (class), NULL);
  g_return_val_if_fail (property_name != NULL, NULL);
  pspec = g_param_spec_pool_lookup (pspec_pool,
				    property_name,
				    G_OBJECT_CLASS_TYPE (class),
				    TRUE);
  if (pspec)
    {
      redirect = g_param_spec_get_redirect_target (pspec);
      if (redirect)
	return redirect;
      else
	return pspec;
    }
  else
    return NULL;
}