Re: [PATCH] gjs: Use enum info from GI, to support unregistered enums
"Tommi Komulainen" <[email protected]> Tue, 21 Oct 2008 13:30:11 +0100
| Newsgroups | gmane.comp.gnome.language-bindings |
|---|---|
| Message-ID | <[email protected]> |
> + first_value = g_enum_info_get_value((GIEnumInfo *)symbol_info, 0);
> + last_value = g_enum_info_get_value((GIEnumInfo *)symbol_info, n_values - 1);
> + if (arg->v_int < g_value_info_get_value(first_value) ||
>+ arg->v_int > g_value_info_get_value(last_value)) {
Hmm, enum_values are guaranteed to be in increasing order? And I think
enums are not necessarily continuous. Would it make sense to have
something like 'gboolean g_enum_info_check_value()' in girepo itself?
Otherwise looks good to me.
--
Tommi Komulainen [email protected]
_______________________________________________
language-bindings mailing list [email protected]
http://mail.gnome.org/mailman/listinfo/language-bindings