GNOME Bugzilla – Bug 670141
make GMappedFile a GBytes
Last modified: 2012-02-15 14:52:23 UTC
Can we just make a GMappedFile a GBytes? The struct layout is the same (there even was a check for this, although the GBytes merge removed that check), and it would be simpler to treat a GMappedFile as a GBytes, instead of having to wrap it in a GBytes with g_bytes_new_with_free_func (g_mapped_file_get_data(m), g_mapped_file_get_length(m), g_mapped_file_unref, m). Then g_mapped_file_{free,ref,unref,get_{lenght,contents}} could be deprecated, as well as the GMappedFile boxed GType.
*** This bug has been marked as a duplicate of bug 666854 ***