After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 670141 - make GMappedFile a GBytes
make GMappedFile a GBytes
Status: RESOLVED DUPLICATE of bug 666854
Product: glib
Classification: Platform
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-02-15 14:48 UTC by Christian Persch
Modified: 2012-02-15 14:52 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Christian Persch 2012-02-15 14:48:35 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.
Comment 1 Matthias Clasen 2012-02-15 14:52:23 UTC

*** This bug has been marked as a duplicate of bug 666854 ***