[libpeas] Adjust to API break in gobject-introspection.
- From: Steve Frécinaux <sfre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpeas] Adjust to API break in gobject-introspection.
- Date: Sun, 11 Jul 2010 10:43:45 +0000 (UTC)
commit 52e493e1e91b98bb75356b762b8e7dcef2f504cc
Author: Steve Frécinaux <code istique net>
Date: Sun Jul 11 12:00:34 2010 +0200
Adjust to API break in gobject-introspection.
gobject-introspection's libgirepository dropped support for
machine-dependent types (short, int, long) and for time_t, so we need
to adjust as well. This should have no consequencies as according to
the g-i commit the typelib was only using machine-specific types yet.
Also bump the gobject-introspection requirement to ensure we're using
a new enough typelib format.
For more information, see gobject-introspection commit
5cb925b20739c04e18e94a03a3e4e68041894b03: "Don't include
machine-dependent integral types in the typelib"
https://bugzilla.gnome.org/show_bug.cgi?id=624080
configure.ac | 5 +--
libpeas/peas-introspection.c | 68 ------------------------------------
loaders/seed/peas-extension-seed.c | 45 +----------------------
3 files changed, 4 insertions(+), 114 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 650c030..31fe50c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -49,7 +49,6 @@ LT_INIT([disable-static])
AC_CHECK_FUNCS(fsync)
-AC_CHECK_SIZEOF(time_t, [], [#include <time.h>])
dnl ================================================================
dnl Gettext stuff.
@@ -73,7 +72,7 @@ PKG_CHECK_MODULES(PEAS, [
glib-2.0 >= 2.18.0
gobject-2.0 >= 2.23.6
gmodule-2.0 >= 2.18.0
- gobject-introspection-1.0 >= 0.6.7
+ gobject-introspection-1.0 >= 0.9.0
])
dnl ================================================================
@@ -135,7 +134,7 @@ dnl ================================================================
dnl GObject Introspection
dnl ================================================================
-GOBJECT_INTROSPECTION_REQUIRE([0.6.7])
+GOBJECT_INTROSPECTION_REQUIRE([0.9.0])
dnl ================================================================
dnl Seed Javascript Engine
diff --git a/libpeas/peas-introspection.c b/libpeas/peas-introspection.c
index 6e11ec4..ec1ee0f 100644
--- a/libpeas/peas-introspection.c
+++ b/libpeas/peas-introspection.c
@@ -64,46 +64,12 @@ read_next_argument (GArgument *cur_arg,
case GI_TYPE_TAG_UINT64:
cur_arg->v_uint64 = va_arg (args, guint64);
break;
- case GI_TYPE_TAG_SHORT:
- cur_arg->v_short = va_arg (args, int);
- break;
- case GI_TYPE_TAG_USHORT:
- cur_arg->v_ushort = va_arg (args, int);
- break;
- case GI_TYPE_TAG_INT:
- cur_arg->v_int = va_arg (args, gint);
- break;
- case GI_TYPE_TAG_UINT:
- cur_arg->v_uint = va_arg (args, guint);
- break;
- case GI_TYPE_TAG_LONG:
- cur_arg->v_long = va_arg (args, glong);
- break;
- case GI_TYPE_TAG_ULONG:
- cur_arg->v_ulong = va_arg (args, gulong);
- break;
- case GI_TYPE_TAG_SSIZE:
- cur_arg->v_ssize = va_arg (args, gssize);
- break;
- case GI_TYPE_TAG_SIZE:
- cur_arg->v_size = va_arg (args, gsize);
- break;
case GI_TYPE_TAG_FLOAT:
cur_arg->v_float = va_arg (args, gdouble);
break;
case GI_TYPE_TAG_DOUBLE:
cur_arg->v_double = va_arg (args, gdouble);
break;
- case GI_TYPE_TAG_TIME_T:
- /* borrowed from gfield.c in gobject-introspection */
-#if SIZEOF_TIME_T == 4
- cur_arg->v_int32 = va_arg (args, time_t);
-#elif SIZEOF_TIME_T == 8
- cur_arg->v_int64 = va_arg (args, time_t);
-#else
-# error "Unexpected size for time_t: not 4 or 8"
-#endif
- break;
case GI_TYPE_TAG_GTYPE:
/* apparently, GType is meant to be a gsize, from gobject/gtype.h in glib */
cur_arg->v_size = va_arg (args, GType);
@@ -165,46 +131,12 @@ set_return_value (gpointer in_retval,
case GI_TYPE_TAG_UINT64:
*((guint64 *) in_retval) = out_retval->v_uint64;
break;
- case GI_TYPE_TAG_SHORT:
- *((gshort *) in_retval) = out_retval->v_short;
- break;
- case GI_TYPE_TAG_USHORT:
- *((gushort *) in_retval) = out_retval->v_ushort;
- break;
- case GI_TYPE_TAG_INT:
- *((gint *) in_retval) = out_retval->v_int;
- break;
- case GI_TYPE_TAG_UINT:
- *((guint *) in_retval) = out_retval->v_uint;
- break;
- case GI_TYPE_TAG_LONG:
- *((glong *) in_retval) = out_retval->v_long;
- break;
- case GI_TYPE_TAG_ULONG:
- *((gulong *) in_retval) = out_retval->v_ulong;
- break;
- case GI_TYPE_TAG_SSIZE:
- *((gssize *) in_retval) = out_retval->v_ssize;
- break;
- case GI_TYPE_TAG_SIZE:
- *((gsize *) in_retval) = out_retval->v_size;
- break;
case GI_TYPE_TAG_FLOAT:
*((gfloat *) in_retval) = out_retval->v_float;
break;
case GI_TYPE_TAG_DOUBLE:
*((gdouble *) in_retval) = out_retval->v_double;
break;
- case GI_TYPE_TAG_TIME_T:
- /* borrowed from gfield.c in gobject-introspection */
-#if SIZEOF_TIME_T == 4
- *((gint32 *) in_retval) = out_retval->v_int32;
-#elif SIZEOF_TIME_T == 8
- *((gint64 *) in_retval) = out_retval->v_int64;
-#else
-# error "Unexpected size for time_t: not 4 or 8"
-#endif
- break;
case GI_TYPE_TAG_GTYPE:
/* apparently, GType is meant to be a gsize, from gobject/gtype.h in glib */
*((gsize *) in_retval) = out_retval->v_size;
diff --git a/loaders/seed/peas-extension-seed.c b/loaders/seed/peas-extension-seed.c
index e5e6435..b2fa8a7 100644
--- a/loaders/seed/peas-extension-seed.c
+++ b/loaders/seed/peas-extension-seed.c
@@ -108,23 +108,15 @@ read_next_argument (SeedContext ctx,
case GI_TYPE_TAG_BOOLEAN:
return seed_value_from_boolean (ctx, va_arg (args, gboolean), exc);
case GI_TYPE_TAG_INT8:
- case GI_TYPE_TAG_UINT8:
case GI_TYPE_TAG_INT16:
- case GI_TYPE_TAG_UINT16:
- case GI_TYPE_TAG_SHORT:
- case GI_TYPE_TAG_USHORT:
- case GI_TYPE_TAG_INT:
return seed_value_from_int (ctx, va_arg (args, gint), exc);
- case GI_TYPE_TAG_UINT:
+ case GI_TYPE_TAG_UINT8:
+ case GI_TYPE_TAG_UINT16:
return seed_value_from_uint (ctx, va_arg (args, guint), exc);
case GI_TYPE_TAG_INT32:
return seed_value_from_long (ctx, va_arg (args, gint32), exc);
case GI_TYPE_TAG_UINT32:
return seed_value_from_ulong (ctx, va_arg (args, guint32), exc);
- case GI_TYPE_TAG_LONG:
- return seed_value_from_long (ctx, va_arg (args, glong), exc);
- case GI_TYPE_TAG_ULONG:
- return seed_value_from_ulong (ctx, va_arg (args, gulong), exc);
case GI_TYPE_TAG_INT64:
return seed_value_from_int64 (ctx, va_arg (args, gint64), exc);
case GI_TYPE_TAG_UINT64:
@@ -134,12 +126,6 @@ read_next_argument (SeedContext ctx,
return seed_value_from_double (ctx, va_arg (args, gdouble), exc);
break;
- case GI_TYPE_TAG_SSIZE:
- return seed_value_from_long (ctx, va_arg (args, gssize), exc);
- case GI_TYPE_TAG_SIZE:
- return seed_value_from_ulong (ctx, va_arg (args, gsize), exc);
- case GI_TYPE_TAG_TIME_T:
- return seed_value_from_int64 (ctx, va_arg (args, time_t), exc);
case GI_TYPE_TAG_GTYPE:
/* apparently, GType is meant to be a gsize, from gobject/gtype.h in glib */
return seed_value_from_ulong (ctx, va_arg (args, GType), exc);
@@ -201,24 +187,6 @@ set_return_value (OutArg *arg,
case GI_TYPE_TAG_UINT64:
*((guint64 *) arg->ptr) = seed_value_to_uint64 (ctx, value, exc);
break;
- case GI_TYPE_TAG_SHORT:
- *((gshort *) arg->ptr) = seed_value_to_int (ctx, value, exc);
- break;
- case GI_TYPE_TAG_USHORT:
- *((gushort *) arg->ptr) = seed_value_to_uint (ctx, value, exc);
- break;
- case GI_TYPE_TAG_INT:
- *((gint *) arg->ptr) = seed_value_to_int (ctx, value, exc);
- break;
- case GI_TYPE_TAG_UINT:
- *((guint *) arg->ptr) = seed_value_to_uint (ctx, value, exc);
- break;
- case GI_TYPE_TAG_LONG:
- *((glong *) arg->ptr) = seed_value_to_long (ctx, value, exc);
- break;
- case GI_TYPE_TAG_ULONG:
- *((gulong *) arg->ptr) = seed_value_to_ulong (ctx, value, exc);
- break;
case GI_TYPE_TAG_FLOAT:
*((gfloat *) arg->ptr) = seed_value_to_float (ctx, value, exc);
break;
@@ -226,15 +194,6 @@ set_return_value (OutArg *arg,
*((gdouble *) arg->ptr) = seed_value_to_double (ctx, value, exc);
break;
- case GI_TYPE_TAG_SSIZE:
- *((gssize *) arg->ptr) = seed_value_to_ulong (ctx, value, exc);
- break;
- case GI_TYPE_TAG_SIZE:
- *((gsize *) arg->ptr) = seed_value_to_long (ctx, value, exc);
- break;
- case GI_TYPE_TAG_TIME_T:
- *((time_t *) arg->ptr) = seed_value_to_int64 (ctx, value, exc);
- break;
case GI_TYPE_TAG_GTYPE:
/* apparently, GType is meant to be a gsize, from gobject/gtype.h in glib */
*((GType *) arg->ptr) = seed_value_to_ulong (ctx, value, exc);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]