[tracker/tracker-0.8] libtracker-common: Compilation error fix in validating ints
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.8] libtracker-common: Compilation error fix in validating ints
- Date: Thu, 6 May 2010 17:58:20 +0000 (UTC)
commit fbf44606b19ddc98e35b5cab069893857dba99a0
Author: Philip Van Hoof <philip codeminded be>
Date: Thu May 6 11:36:15 2010 +0200
libtracker-common: Compilation error fix in validating ints
src/libtracker-common/tracker-keyfile-object.c | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/src/libtracker-common/tracker-keyfile-object.c b/src/libtracker-common/tracker-keyfile-object.c
index f821fd6..c9abbed 100644
--- a/src/libtracker-common/tracker-keyfile-object.c
+++ b/src/libtracker-common/tracker-keyfile-object.c
@@ -119,21 +119,23 @@ tracker_keyfile_object_validate_int (gpointer object,
const gchar *property,
gint value)
{
- g_return_val_if_fail (G_IS_OBJECT (object), FALSE);
- g_return_val_if_fail (property != NULL, FALSE);
-
#ifdef G_DISABLE_CHECKS
GParamSpec *spec;
- GValue value = { 0 };
+ GValue gvalue = { 0 };
gboolean valid;
+#endif
+ g_return_val_if_fail (G_IS_OBJECT (object), FALSE);
+ g_return_val_if_fail (property != NULL, FALSE);
+
+#ifdef G_DISABLE_CHECKS
spec = g_object_class_find_property (G_OBJECT_CLASS (object), property);
g_return_val_if_fail (spec != NULL, FALSE);
- g_value_init (&value, spec->value_type);
- g_value_set_int (&value, verbosity);
- valid = g_param_value_validate (spec, &value);
- g_value_unset (&value);
+ g_value_init (&gvalue, spec->value_type);
+ g_value_set_int (&gvalue, value);
+ valid = g_param_value_validate (spec, &gvalue);
+ g_value_unset (&gvalue);
g_return_val_if_fail (valid != TRUE, FALSE);
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]