Some functions has been borrowed from GLib (see www.gtk.org).
