From: John Darrington Date: Fri, 7 Apr 2017 11:47:09 +0000 (+0200) Subject: Change the signature of myreversefunc to return bool X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3c72b69f996e096e7da8eff1fa6e586aa16f18f;p=pspp Change the signature of myreversefunc to return bool --- diff --git a/src/ui/gui/psppire-data-editor.c b/src/ui/gui/psppire-data-editor.c index 2546c8e7a9..436405e247 100644 --- a/src/ui/gui/psppire-data-editor.c +++ b/src/ui/gui/psppire-data-editor.c @@ -568,7 +568,7 @@ on_data_selection_change (PsppireDataEditor *de, JmdRange *sel) static void set_font_recursively (GtkWidget *w, gpointer data); -void myreversefunc (GtkTreeModel *model, gint col, gint row, const gchar *in, +gboolean myreversefunc (GtkTreeModel *model, gint col, gint row, const gchar *in, GValue *out); diff --git a/src/ui/gui/psppire-data-store.c b/src/ui/gui/psppire-data-store.c index a8e86072de..c7dc55afa5 100644 --- a/src/ui/gui/psppire-data-store.c +++ b/src/ui/gui/psppire-data-store.c @@ -129,14 +129,14 @@ __iter_nth_child (GtkTreeModel *tree_model, return TRUE; } -void +gboolean myreversefunc (GtkTreeModel *model, gint col, gint row, const gchar *in, GValue *out) { PsppireDataStore *store = PSPPIRE_DATA_STORE (model); const struct variable *variable = psppire_dict_get_variable (store->dict, col); - g_return_if_fail (variable); + g_return_val_if_fail (variable, FALSE); const struct fmt_spec *fmt = var_get_print_format (variable); @@ -154,6 +154,7 @@ myreversefunc (GtkTreeModel *model, gint col, gint row, g_value_init (out, G_TYPE_VARIANT); g_value_set_variant (out, vrnt); free (xx); + return TRUE; } gchar *