Commits

Reid van Melle committed cb97a7e

Got the test-score working; adding conversion headers for gslist

Comments (0)

Files changed (2)

clutter/wrappers.h

 #endif
 #define GdkPixbuf_val(val)  (check_cast(GDK_PIXBUF, val))
 
+// taken from ml_glib.h
+CAMLexport value copy_string_g_free (char *str); /* for g_strings only */
+
+typedef value (*value_in)(gpointer);
+typedef gpointer (*value_out)(value);
+
+CAMLexport value Val_GList (GList *list, value_in);
+CAMLexport value Val_GList_free (GList *list, value_in);
+CAMLexport GList *GList_val (value list, value_out);
+
+CAMLexport value Val_GSList (GSList *list, value_in);
+CAMLexport value Val_GSList_free (GSList *list, value_in);
+CAMLexport GSList *GSList_val (value list, value_out);
+
+CAMLexport void ml_register_exn_map (GQuark domain, char *caml_name);
+CAMLexport void ml_raise_gerror(GError *) Noreturn;
+
 #endif /* _wrappers */

tests/test-score.ml

   and _ = score#connect#completed
     (fun _ -> clutter_quit ())
   in
-  score#append timeline1;
-  score#append ~parent:timeline1 timeline2;
-  score#append ~parent:timeline1 timeline3;
-  score#append ~parent:timeline3 timeline4;
+  let _ = score#append timeline1 
+  and _ = score#append ~parent:timeline1 timeline2
+  and _ = score#append ~parent:timeline1 timeline3
+  and _ = score#append ~parent:timeline3 timeline4 in
 
   score#append_at_marker ~parent:timeline2 ~marker:"foo" timeline5;
 
   let timelines = score#list_timelines in
   printf "timelines=%d\n%!" (List.length timelines);
-  assert ((Array.length timelines) = 5);
+  assert ((List.length timelines) = 5);
 
   score#start;