[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: paramspec value_validate
- From: Kevin Ryde <user42 zip com au>
- To: gtk-perl-list gnome org
- Subject: Re: paramspec value_validate
- Date: Wed, 26 Nov 2008 11:17:42 +1100
Torsten Schoenfeld <kaffeetisch gmx de> writes:
>
> There's one thing that still isn't clear to me: what about the
> gunichar issue? Your wrapper of g_param_value_validate uses
> gperl_value_from_sv,
Yes, I basically followed g_object_set doing init_property_value() and
gperl_value_from_sv() once I realized value_validate isn't a general
validity check, only further restrictions on a GValue of already correct
GType.
> so it will not accept single-char strings, only
> plain numbers. Wouldn't a user expect to be able to pass in
> single-char strings?
Maybe, but I think value_validate and value_cmp will be working on
things that you're soon to pass to or from get_property and
set_property, so I think they might best follow those latter, for better
or worse.
> It does leave me
> worrying about the inconsistent gunichar API we offer, however.
> Manually wrapped functions return and take single-char strings. But
> everything which goes through the property system needs to be a plain
> integer. Is there anything we can do about this?
I guess the blame lies with GValue unhelpfully not distinguishing a
unichar. I suspect trying to fight against that in unichar paramspecs
might only lead to more pain, or only pain of a different kind. :-)
The best I can think is just try to confine the numeric style to things
related to parameters and paramspecs and put it down to hysterical
raisins. :-(
> "svn diff" from the root.
I'll try to do that at least for multiple files.
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]