[gobject-introspection] Export gi_type_tag_get_ffi_type



commit 57488c5e52b8f51a032c61860a9bb75526c015bc
Author: Colin Walters <walters verbum org>
Date:   Tue Nov 9 17:06:29 2010 -0500

    Export gi_type_tag_get_ffi_type
    
    This is needed by the offsets code, and is generally useful.  We
    need to export it for a future patch which won't export symbols
    with a leading _.

 girepository/girepository-private.h |    2 --
 girepository/girffi.c               |   13 ++++++++++---
 girepository/girffi.h               |    2 ++
 girepository/giroffsets.c           |    4 ++--
 4 files changed, 14 insertions(+), 7 deletions(-)
---
diff --git a/girepository/girepository-private.h b/girepository/girepository-private.h
index 46b898b..897c52c 100644
--- a/girepository/girepository-private.h
+++ b/girepository/girepository-private.h
@@ -108,8 +108,6 @@ GIVFuncInfo * _g_base_info_find_vfunc (GIRealInfo   *rinfo,
 				       gint          n_vfuncs,
 				       const gchar  *name);
 
-ffi_type *    _gi_type_tag_get_ffi_type (GITypeTag type_tag, gboolean is_pointer);
-
 extern ffi_status ffi_prep_closure_loc (ffi_closure *,
                                         ffi_cif *,
                                         void (*fun)(ffi_cif *, void *, void **, void *),
diff --git a/girepository/girffi.c b/girepository/girffi.c
index 23b076b..c46d3d3 100644
--- a/girepository/girffi.c
+++ b/girepository/girffi.c
@@ -30,9 +30,16 @@
 #include "girepository.h"
 #include "girepository-private.h"
 
+/**
+ * gi_type_tag_get_ffi_type:
+ * @tag: A #GITypeTag
+ * @is_pointer: Whether or not this is a pointer type
+ *
+ * Returns: A #ffi_type corresponding to the platform default C ABI for @tag and @is_pointer.
+ */
 ffi_type *
-_gi_type_tag_get_ffi_type (GITypeTag   tag,
-			   gboolean    is_pointer)
+gi_type_tag_get_ffi_type (GITypeTag   tag,
+			  gboolean    is_pointer)
 {
   switch (tag)
     {
@@ -96,7 +103,7 @@ _gi_type_tag_get_ffi_type (GITypeTag   tag,
 ffi_type *
 g_type_info_get_ffi_type (GITypeInfo *info)
 {
-  return _gi_type_tag_get_ffi_type (g_type_info_get_tag (info), g_type_info_is_pointer (info));
+  return gi_type_tag_get_ffi_type (g_type_info_get_tag (info), g_type_info_is_pointer (info));
 }
 
 /**
diff --git a/girepository/girffi.h b/girepository/girffi.h
index 56d85a1..a5cc9e4 100644
--- a/girepository/girffi.h
+++ b/girepository/girffi.h
@@ -45,6 +45,8 @@ struct _GIFunctionInvoker {
   gpointer padding[3];
 };
 
+ffi_type *    gi_type_tag_get_ffi_type            (GITypeTag type_tag, gboolean is_pointer);
+
 ffi_type *    g_type_info_get_ffi_type            (GITypeInfo           *info);
 
 gboolean      g_function_info_prep_invoker        (GIFunctionInfo       *info,
diff --git a/girepository/giroffsets.c b/girepository/giroffsets.c
index 94fdc66..5c16f81 100644
--- a/girepository/giroffsets.c
+++ b/girepository/giroffsets.c
@@ -18,7 +18,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#include "girepository-private.h"
+#include "girffi.h"
 #include "girnode.h"
 #include <string.h>
 
@@ -296,7 +296,7 @@ get_type_size_alignment (GIrTypelibBuild   *build,
 	}
       else
 	{
-	  type_ffi = _gi_type_tag_get_ffi_type (type->tag, type->is_pointer);
+	  type_ffi = gi_type_tag_get_ffi_type (type->tag, type->is_pointer);
 
 	  if (type_ffi == &ffi_type_void)
 	    {



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