Re: #50215 - g_param_spec_string_c is a very cryptic function name



On 26 Mar 2001, Owen Taylor wrote:

> 
> I see that g_param_spec_string_c has been renamed to g_param_spec_stringc.
> 
> I don't think this makes it much clearer ;-)
> 
> 
> What the function appears to do is to create a string parameter spec
> with a validation rule equivalent to that for C indentifiers.
> 
> But that has nothing to do with C strings are, and the single letter
> 'c' is generally rather confusing without further context.
> 
> How about g_param_spec_identifier?

shouldn't it say that it's a C identifier? i.e. through
g_param_spec_cidentifier() ?

btw, i don't feel strongly about having this function in glib at all,
i don't know if it will be broadly used, the main reasons i added it were:
1) i had to have it anyways because BSE uses this type of string
   for Object::name
2) it shows how to have an alternative param spec creation
   function, needed because the common creator doesn't need that type
   of versatility
3) it gives an idea of how fine grained validation should work

> 
> Regards,
>                                         Owen
> 

---
ciaoTJ





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