Re: paramspec value_validate



Kevin Ryde wrote:
This is the paramspec->value_validate I posted before, cleaned up a bit.

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, 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? In an earlier message in another thread, you concluded that

  [a] difference between typemap and $obj->get_property isn't
  something values_cmp should worry about.  If it operates on whatever
  ->get_property and ->set_property do then that's enough.

And I think this also applies to value_validate. 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?

Apart from this fundamental issue, I think this patch and also the one for value_cmp are fine. muppet?

By the way: Kevin, your patches would be easier to handle if they were done directly from the root directory of the module. That is, instead of "svn diff GParamSpec.xs" and "svn diff e.t", just "svn diff" from the root. This way, the patch can be applied from the root directory, and in one go. It also has the advantage that all the file changes making up a single logical change are kept together.



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