summaryrefslogtreecommitdiff
path: root/src/eom-jobs.c
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-05-17 15:52:02 +0200
committerinfirit <[email protected]>2014-07-24 18:05:54 +0200
commitd69408760eaa86d0532068c66c92847f2c12379c (patch)
tree7002cd155f7589524afbe198d7dcbcbbfeef06fe /src/eom-jobs.c
parent7654cb5af09a0e7522f1fdffce5ab6b469303790 (diff)
downloadeom-d69408760eaa86d0532068c66c92847f2c12379c.tar.bz2
eom-d69408760eaa86d0532068c66c92847f2c12379c.tar.xz
Use new GLib threading API
Based on eog commit by Felix Riemann <[email protected]> Url: https://git.gnome.org/browse/eog/commit/?id=b5f61d90d0478378cf7cf21bf5ade9eded0ae9f2
Diffstat (limited to 'src/eom-jobs.c')
-rw-r--r--src/eom-jobs.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/eom-jobs.c b/src/eom-jobs.c
index ee5d72b..48afc1c 100644
--- a/src/eom-jobs.c
+++ b/src/eom-jobs.c
@@ -64,7 +64,9 @@ static void eom_job_transform_run (EomJob *ejob);
static void eom_job_init (EomJob *job)
{
- job->mutex = g_mutex_new();
+ /* NOTE: We need to allocate the mutex here so the ABI stays the same when it used to use g_mutex_new */
+ job->mutex = g_malloc (sizeof (GMutex));
+ g_mutex_init (job->mutex);
job->progress = 0.0;
}
@@ -81,8 +83,8 @@ eom_job_dispose (GObject *object)
}
if (job->mutex) {
- g_mutex_free (job->mutex);
- job->mutex = NULL;
+ g_mutex_clear (job->mutex);
+ g_free (job->mutex);
}
(* G_OBJECT_CLASS (eom_job_parent_class)->dispose) (object);