]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
[event-loop] Store loop in timeout watch structure
authorRay Strode <rstrode@redhat.com>
Sun, 15 Nov 2009 16:49:23 +0000 (11:49 -0500)
committerRay Strode <rstrode@redhat.com>
Sun, 15 Nov 2009 16:49:23 +0000 (11:49 -0500)
This will allow us to pass the watch and loop to
functions that only take one argument, without
having to create a new structure.

src/libply/ply-event-loop.c

index 7a757b080e836d1eaa8d8fd2059fed923b3ddeaf..a6691c48f912df0d8b3c8be9d0dc91a403062ee5 100644 (file)
@@ -98,6 +98,7 @@ typedef struct
 
 typedef struct
 {
+  ply_event_loop_t *loop;
   double timeout;
   ply_event_loop_timeout_handler_t  handler;
   void                             *user_data;
@@ -896,6 +897,7 @@ ply_event_loop_watch_for_timeout (ply_event_loop_t    *loop,
   assert (seconds > 0.0);
 
   timeout_watch = calloc (1, sizeof (ply_event_loop_timeout_watch_t));
+  timeout_watch->loop = loop;
   timeout_watch->timeout = ply_get_timestamp () + seconds;
   timeout_watch->handler = timeout_handler;
   timeout_watch->user_data = user_data;