Re: how to submit a feature request for glib? oversight?



Peter Jay Salzman <p dirac org> writes:

hi there,

i think it would be much more useful for the functions

g_string_sprintf()
g_string_sprintfa()

to return the number of characters written to the target GString.   they
currently return void.   this would also have the happy consequence of
conforming to glibc's snprintf.

is there a reason i'm not thinking of why they don't do this?  seems like
very useful info to return.

while we're at it, i find it curious that

g_string_append()
g_string_append_c()

return the GString we pass to the function.  it seems like returning the
number of characters written to the GString would be more useful too.

could this possibly be an oversight by the library designers?

See the glib README file for information about bugs/feature
requests/patches. (Short answer, bugzilla.gnome.org.)

[ The reason g_string_append() returns the string is, supposedly so you can
  do something like:

    string = g_string_append (g_string_new ("me "), "too");

  Never seen much point in that myself. ]

Regards,
                                        Owen




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