[seed] format change for intropsection version - now - GOBJECT_INTROSPECTION_VERSION = 0x000904
- From: Alan Knowles <alank src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seed] format change for intropsection version - now - GOBJECT_INTROSPECTION_VERSION = 0x000904
- Date: Fri, 16 Jul 2010 03:52:06 +0000 (UTC)
commit e77116f169645e3b950a84790d072d86009d99ca
Author: Alan Knowles <alan akbkhome com>
Date: Fri Jul 16 11:51:09 2010 +0800
format change for intropsection version - now - GOBJECT_INTROSPECTION_VERSION = 0x000904
This enables fine tune checking for versions
configure.ac | 8 ++++----
libseed/Makefile.am | 3 +--
libseed/seed-closure.c | 4 ++--
libseed/seed-types.c | 6 +++---
4 files changed, 10 insertions(+), 11 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index bc80a59..21bd797 100644
--- a/configure.ac
+++ b/configure.ac
@@ -105,10 +105,10 @@ PKG_CHECK_MODULES(GOBJECT_INTROSPECTION, gobject-introspection-1.0 >= 0.6.14)
AC_SUBST(GOBJECT_INTROSPECTION_CFLAGS)
AC_SUBST(GOBJECT_INTROSPECTION_LDFLAGS)
-GOBJECT_INTROSPECTION_VERSION_MAJOR=`$PKG_CONFIG --modversion gobject-introspection-1.0 | cut -d . -f 1`
-GOBJECT_INTROSPECTION_VERSION_MINOR=`$PKG_CONFIG --modversion gobject-introspection-1.0 | cut -d . -f 2`
-AC_SUBST(GOBJECT_INTROSPECTION_VERSION_MAJOR)
-AC_SUBST(GOBJECT_INTROSPECTION_VERSION_MINOR)
+GOBJECT_INTROSPECTION_VERSION=`$PKG_CONFIG --modversion gobject-introspection-1.0 | $AWK '{ split($1, a , ".") ; printf "0x%02d%02d%02d", a[1], a[2], a[3] }'`
+
+AC_SUBST(GOBJECT_INTROSPECTION_VERSION)
+
diff --git a/libseed/Makefile.am b/libseed/Makefile.am
index 6393e19..5b05e6e 100644
--- a/libseed/Makefile.am
+++ b/libseed/Makefile.am
@@ -33,8 +33,7 @@ libseed_la_CFLAGS = \
$(SEED_DEBUG_CFLAGS) \
$(SEED_PROFILE_CFLAGS) \
$(FFI_CFLAGS) \
- -DGOBJECT_INTROSPECTION_VERSION_MAJOR=$(GOBJECT_INTROSPECTION_VERSION_MAJOR) \
- -DGOBJECT_INTROSPECTION_VERSION_MINOR=$(GOBJECT_INTROSPECTION_VERSION_MINOR)
+ -DGOBJECT_INTROSPECTION_VERSION=$(GOBJECT_INTROSPECTION_VERSION)
libseed_la_LDFLAGS = \
-no-undefined \
diff --git a/libseed/seed-closure.c b/libseed/seed-closure.c
index 8173fe2..d01c240 100644
--- a/libseed/seed-closure.c
+++ b/libseed/seed-closure.c
@@ -76,7 +76,7 @@ seed_handle_closure (ffi_cif * cif, void *result, void **args, void *userdata)
switch (tag)
{
-#if GOBJECT_INTROSPECTION_VERSION_MAJOR == 0 && GOBJECT_INTROSPECTION_VERSION_MINOR < 9
+#if GOBJECT_INTROSPECTION_VERSION >= 0x000900
case GI_TYPE_TAG_LONG:
arg->v_long = *(glong *) args[i];
break;
@@ -195,7 +195,7 @@ seed_handle_closure (ffi_cif * cif, void *result, void **args, void *userdata)
&return_arg, 0);
switch (return_tag)
{
-#if GOBJECT_INTROSPECTION_VERSION_MAJOR == 0 && GOBJECT_INTROSPECTION_VERSION_MINOR < 9
+#if GOBJECT_INTROSPECTION_VERSION >= 0x000900
case GI_TYPE_TAG_LONG:
*(glong *) result = return_arg.v_long;
break;
diff --git a/libseed/seed-types.c b/libseed/seed-types.c
index 1548909..0ca0ac3 100644
--- a/libseed/seed-types.c
+++ b/libseed/seed-types.c
@@ -390,7 +390,7 @@ seed_gi_make_array (JSContextRef ctx,
}
break;
-#if GOBJECT_INTROSPECTION_VERSION_MAJOR == 0 && GOBJECT_INTROSPECTION_VERSION_MINOR < 9
+#if GOBJECT_INTROSPECTION_VERSION >= 0x000900
case GI_TYPE_TAG_INT:
#endif
case GI_TYPE_TAG_INT32:
@@ -517,7 +517,7 @@ seed_gi_make_argument (JSContextRef ctx,
}
break;
-#if GOBJECT_INTROSPECTION_VERSION_MAJOR == 0 && GOBJECT_INTROSPECTION_VERSION_MINOR < 9
+#if GOBJECT_INTROSPECTION_VERSION >= 0x000900
case GI_TYPE_TAG_LONG:
arg->v_long = seed_value_to_long (ctx, value, exception);
break;
@@ -808,7 +808,7 @@ seed_gi_argument_make_js (JSContextRef ctx,
switch (gi_tag)
{
-#if GOBJECT_INTROSPECTION_VERSION_MAJOR == 0 && GOBJECT_INTROSPECTION_VERSION_MINOR < 9
+#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:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]