[pygobject] Use gi_cclosure_marshal_generic instead of duplicating it.



commit 0591cc6f160ae6e9d8c3970934ae105ef340d7d3
Author: Michel DÃnzer <michel daenzer net>
Date:   Thu Mar 8 12:21:28 2012 +0100

    Use gi_cclosure_marshal_generic instead of duplicating it.
    
    Bump gobject-introspection dependency to ensure that we have the corresponding
    changes in g-i.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=668903
    
    Signed-off-by: Michel DÃnzer <michel daenzer net>
    Signed-off-by: Martin Pitt <martin pitt ubuntu com>

 configure.ac                 |    3 +-
 gi/_gobject/Makefile.am      |    7 +--
 gi/_gobject/ffi-marshaller.c |  194 ------------------------------------------
 gi/_gobject/ffi-marshaller.h |   31 -------
 gi/_gobject/gobjectmodule.c  |   12 +--
 5 files changed, 4 insertions(+), 243 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 617e78b..b3ab81c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,7 +16,7 @@ m4_define(pygobject_micro_version, 2)
 m4_define(pygobject_version, pygobject_major_version.pygobject_minor_version.pygobject_micro_version)
 
 dnl versions of packages we require ...
-m4_define(introspection_required_version, 1.29.0)
+m4_define(introspection_required_version, 1.31.20)
 m4_define(py2cairo_required_version, 1.2.0)
 m4_define(py3cairo_required_version, 1.10.0)
 m4_define(glib_required_version, 2.31.0)
@@ -174,7 +174,6 @@ if test x"$with_libffi" = xyes && test x"$have_libffi" = xno ; then
   AC_MSG_ERROR([ffi requested, but not found])
 fi
 if test x"$have_libffi" = xyes; then
-  AC_DEFINE(HAVE_FFI_H,1,[Have libffi include files])
   LIBFFI_PC=libffi
 fi
 AM_CONDITIONAL(HAVE_LIBFFI, test "$have_libffi" = "yes")
diff --git a/gi/_gobject/Makefile.am b/gi/_gobject/Makefile.am
index 6bddcf7..3263889 100644
--- a/gi/_gobject/Makefile.am
+++ b/gi/_gobject/Makefile.am
@@ -56,7 +56,6 @@ _gobject_la_CFLAGS = \
 	$(extension_cppflags) \
 	-I$(top_srcdir)/gi/_glib \
 	-I$(top_srcdir)/gi \
-	$(FFI_CFLAGS) \
 	$(GLIB_CFLAGS) \
 	$(GI_CFLAGS)
 _gi_la_CPPFLAGS = \
@@ -64,16 +63,12 @@ _gi_la_CPPFLAGS = \
 _gobject_la_LIBADD = \
 	$(extension_libadd) \
 	$(GLIB_LIBS) \
-	$(FFI_LIBS) \
+	$(GI_LIBS) \
 	$(top_builddir)/gi/_glib/libpyglib-gi-2 0- PYTHON_BASENAME@.la
 _gobject_la_LDFLAGS = \
 	$(extension_ldflags) \
 	-export-symbols-regex "_gobject|PyInit__gobject"
 
-if HAVE_LIBFFI
-_gobject_la_SOURCES += ffi-marshaller.c ffi-marshaller.h
-endif
-
 
 all: $(pygobject_LTLIBRARIES:.la=.so)
 check-local: $(pygobject_LTLIBRARIES:.la=.so)
diff --git a/gi/_gobject/gobjectmodule.c b/gi/_gobject/gobjectmodule.c
index 7ac31f6..cacd46b 100644
--- a/gi/_gobject/gobjectmodule.c
+++ b/gi/_gobject/gobjectmodule.c
@@ -25,6 +25,7 @@
 #endif
 
 #include <gobject/gvaluecollector.h>
+#include <girepository.h>
 #include <pyglib.h>
 #include <pythread.h>
 #include "pygobject-private.h"
@@ -36,13 +37,6 @@
 #include "pygpointer.h"
 #include "pygtype.h"
 
-#ifdef HAVE_FFI_H
-#include "ffi-marshaller.h"
-static GSignalCMarshaller marshal_generic = g_cclosure_marshal_generic_ffi;
-#else
-static GSignalCMarshaller marshal_generic = 0;
-#endif
-
 static PyObject *_pyg_signal_accumulator_true_handled_func;
 static GHashTable *log_handlers = NULL;
 static gboolean log_handlers_disabled = FALSE;
@@ -450,7 +444,7 @@ create_signal (GType instance_type, const gchar *signal_name, PyObject *tuple)
     signal_id = g_signal_newv(signal_name, instance_type, signal_flags,
 			      pyg_signal_class_closure_get(),
 			      accumulator, accum_data,
-			      marshal_generic,
+			      gi_cclosure_marshal_generic,
 			      return_type, n_params, param_types);
     g_free(param_types);
 
@@ -2487,9 +2481,7 @@ pygobject_register_features(PyObject *d)
     PyObject *features;
 
     features = PyDict_New();
-#ifdef HAVE_FFI_H
     PyDict_SetItemString(features, "generic-c-marshaller", Py_True);
-#endif
     PyDict_SetItemString(d, "features", features);
     Py_DECREF(features);
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]