Delivered-To: lablgtk at yquem.inria.fr To: lablgtk at math.nagoya-u.ac.jp From: Dawid Toton Date: Fri, 26 Oct 2007 02:14:41 +0200 Lines: 28 Message-ID: Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Lablgtk] Result of get_entry (of entry_completion) - really 'a option ? Content-Type: text/plain; charset=UTF-8; format=flowed Content-Length: 1051 In gtkEditProps.ml there is (I look at sources taken from the repository): external get_entry : [>`entrycompletion] obj -> Gtk.entry obj option = "ml_gtk_entry_completion_get_entry" ...but in ml_gtkedit.c it seems to be not compatible: ML_1(gtk_entry_completion_get_entry,GtkEntryCompletion_val,Val_GtkWidget) Val_GtkWidget is essentially Val_GObject, that in turn is constructed by Make_Val_final_pointer(GObject, g_object_ref, ml_g_object_unref_later, 0) which should give: CAMLprim value Val_GObject (type *p) { value ret; if (!p) ml_raise_null_pointer(); ret = alloc_custom(&ml_custom_GObject, sizeof(value), adv, 1000); initialize (&Field(ret,1), (value) p); init(p); return ret; } get_entry should return (Some x), that is a block with tag=0 and Field(0)=x, but actually returns (as far as I can resolve) a block with Custom_tag. Is it a bug? Is it safe? Dawid Toton _______________________________________________ Lablgtk mailing list Lablgtk@yquem.inria.fr http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk