Gediminas Paulauskas <[EMAIL PROTECTED]> writes:

> We can fix Evolution but we don't know who else uses GAL. So the fix
> should be general, and placed in GAL/GLib.
> 
> all these "broken" functions shouldn't do any checks on validity then,
> but at the top include a check
> 
> g_return_if_fail(g_utf8_validate(str) == TRUE);

This would be highly broken.  A program should never assert on
user-generated input.

g_return_if_fail() and friends are just for checking internal
consistency and for checking that you are passing the correct stuff to
public APIs.

In this case, however, it is up to the application to ensure that the
UTF8 string is valid.

  Federico

_______________________________________________
evolution-hackers maillist  -  [EMAIL PROTECTED]
http://lists.helixcode.com/mailman/listinfo/evolution-hackers

Reply via email to