[seed] Adds support for handling GUNIT32



commit dd591f267d0a726ee69216542d67d04202fbfd6b
Author: Siraj Razick <siraj razick collabora co uk>
Date:   Thu Aug 4 09:19:14 2011 +0530

    Adds support for handling GUNIT32

 libseed/seed-types.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/libseed/seed-types.c b/libseed/seed-types.c
index 6dbb2aa..06bea7c 100644
--- a/libseed/seed-types.c
+++ b/libseed/seed-types.c
@@ -151,6 +151,7 @@ seed_release_arg (GITransfer transfer,
 	    case GI_TYPE_TAG_GTYPE:
 	    case GI_TYPE_TAG_FLOAT:
 	    case GI_TYPE_TAG_UINT8:
+            case GI_TYPE_TAG_UINT32:
 	      g_free (arg->v_pointer);
 	      break;
 	    case GI_TYPE_TAG_INTERFACE:
@@ -464,6 +465,22 @@ seed_gi_make_array (JSContextRef ctx,
 
 	g_base_info_unref (interface);
       }
+    case GI_TYPE_TAG_UINT32:
+      {
+        guint32 *uintresult;
+
+        uintresult = g_new0 (guint32, length + 1);
+
+        for (i = 0; i < length; i++)
+          {
+            elem = JSObjectGetPropertyAtIndex (ctx,
+                                               (JSObjectRef) array,
+                                               i, exception);
+	    uintresult[i] = seed_value_to_uint (ctx, elem, exception);
+          }
+        *array_p = uintresult;
+      }
+      break;
     default:
       seed_make_exception (ctx, exception, "ArgumentError",
 			   "Unhandled array element type");



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