[seed] fix tests for GI_TYPE_TAG_* that where removed in 0.9 GI
- From: Alan Knowles <alank src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seed] fix tests for GI_TYPE_TAG_* that where removed in 0.9 GI
- Date: Fri, 22 Apr 2011 07:38:33 +0000 (UTC)
commit df358cc51df5ab155b1496e21a9da8d6ae401ed3
Author: Alan Knowles <alan akbkhome com>
Date: Fri Apr 22 15:38:21 2011 +0800
fix tests for GI_TYPE_TAG_* that where removed in 0.9 GI
libseed/seed-closure.c | 8 ++------
libseed/seed-types.c | 12 +++---------
2 files changed, 5 insertions(+), 15 deletions(-)
---
diff --git a/libseed/seed-closure.c b/libseed/seed-closure.c
index f1ce83b..f94e17d 100644
--- a/libseed/seed-closure.c
+++ b/libseed/seed-closure.c
@@ -76,8 +76,7 @@ seed_handle_closure (ffi_cif * cif, void *result, void **args, void *userdata)
switch (tag)
{
-#if GOBJECT_INTROSPECTION_VERSION >= 0x000900
-#if GOBJECT_INTROSPECTION_VERSION < 0x001000
+#if GOBJECT_INTROSPECTION_VERSION < 0x000900
case GI_TYPE_TAG_LONG:
arg->v_long = *(glong *) args[i];
break;
@@ -97,7 +96,6 @@ seed_handle_closure (ffi_cif * cif, void *result, void **args, void *userdata)
arg->v_uint = *(guint *) args[i];
break;
#endif
-#endif
case GI_TYPE_TAG_BOOLEAN:
arg->v_boolean = *(gboolean *) args[i];
break;
@@ -197,8 +195,7 @@ seed_handle_closure (ffi_cif * cif, void *result, void **args, void *userdata)
&return_arg, 0);
switch (return_tag)
{
-#if GOBJECT_INTROSPECTION_VERSION >= 0x000900
-#if GOBJECT_INTROSPECTION_VERSION < 0x001000
+#if GOBJECT_INTROSPECTION_VERSION < 0x000900
case GI_TYPE_TAG_LONG:
*(glong *) result = return_arg.v_long;
break;
@@ -218,7 +215,6 @@ seed_handle_closure (ffi_cif * cif, void *result, void **args, void *userdata)
*(guint *) result = return_arg.v_uint;
break;
#endif
-#endif
case GI_TYPE_TAG_BOOLEAN:
*(gboolean *) result = return_arg.v_boolean;
break;
diff --git a/libseed/seed-types.c b/libseed/seed-types.c
index 228d2f8..6dbb2aa 100644
--- a/libseed/seed-types.c
+++ b/libseed/seed-types.c
@@ -390,11 +390,9 @@ seed_gi_make_array (JSContextRef ctx,
}
break;
-#if GOBJECT_INTROSPECTION_VERSION >= 0x000900
-#if GOBJECT_INTROSPECTION_VERSION < 0x001000
+#if GOBJECT_INTROSPECTION_VERSION < 0x000900
case GI_TYPE_TAG_INT:
#endif
-#endif
case GI_TYPE_TAG_INT32:
{
gint *intresult;
@@ -519,8 +517,7 @@ seed_value_to_gi_argument (JSContextRef ctx,
}
break;
-#if GOBJECT_INTROSPECTION_VERSION >= 0x000900
-#if GOBJECT_INTROSPECTION_VERSION < 0x001000
+#if GOBJECT_INTROSPECTION_VERSION < 0x000900
case GI_TYPE_TAG_LONG:
arg->v_long = seed_value_to_long (ctx, value, exception);
break;
@@ -543,7 +540,6 @@ seed_value_to_gi_argument (JSContextRef ctx,
arg->v_long = seed_value_to_time_t (ctx, value, exception);
break;
#endif
-#endif
case GI_TYPE_TAG_BOOLEAN:
arg->v_boolean = seed_value_to_boolean (ctx, value, exception);
@@ -812,8 +808,7 @@ seed_value_from_gi_argument (JSContextRef ctx,
switch (gi_tag)
{
-#if GOBJECT_INTROSPECTION_VERSION >= 0x000900
-#if GOBJECT_INTROSPECTION_VERSION < 0x001000
+#if GOBJECT_INTROSPECTION_VERSION < 0x000900
case GI_TYPE_TAG_LONG:
return seed_value_from_long (ctx, arg->v_long, exception);
case GI_TYPE_TAG_ULONG:
@@ -829,7 +824,6 @@ seed_value_from_gi_argument (JSContextRef ctx,
case GI_TYPE_TAG_TIME_T:
return seed_value_from_time_t (ctx, arg->v_long, exception);
#endif
-#endif
case GI_TYPE_TAG_VOID:
return JSValueMakeUndefined (ctx);
case GI_TYPE_TAG_BOOLEAN:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]