summaryrefslogtreecommitdiff
path: root/glib/gtimezone.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@gnome.org>2012-02-15 18:37:06 +0100
committerChristian Persch <chpe@gnome.org>2012-02-15 18:44:24 +0100
commit6c7d121caf0fc19804670b8e98ae5e1c9abf6a76 (patch)
tree707c7e1c12abd41f68d542f9f49bbc9e2e312167 /glib/gtimezone.c
parent4471d09cd4628eacd46d5bd299a4c7aa8e8fec77 (diff)
downloadglib-wip/mapped-bytes.tar.gz
gbytes: Replace GMappedFile with GBytes in glibwip/mapped-bytes
Don't use deprecated APIs inside glib!
Diffstat (limited to 'glib/gtimezone.c')
-rw-r--r--glib/gtimezone.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/glib/gtimezone.c b/glib/gtimezone.c
index 8195106e0..493d6734f 100644
--- a/glib/gtimezone.c
+++ b/glib/gtimezone.c
@@ -345,7 +345,6 @@ GTimeZone *
g_time_zone_new (const gchar *identifier)
{
GTimeZone *tz;
- GMappedFile *file;
G_LOCK (time_zones);
if (time_zones == NULL)
@@ -391,15 +390,7 @@ g_time_zone_new (const gchar *identifier)
else
filename = g_strdup ("/etc/localtime");
- file = g_mapped_file_new (filename, FALSE, NULL);
- if (file != NULL)
- {
- tz->zoneinfo = g_bytes_new_with_free_func (g_mapped_file_get_contents (file),
- g_mapped_file_get_length (file),
- (GDestroyNotify)g_mapped_file_unref,
- g_mapped_file_ref (file));
- g_mapped_file_unref (file);
- }
+ tz->zoneinfo = g_mapped_file_new (filename, FALSE, NULL);
g_free (filename);
}