diff options
author | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2013-04-24 15:01:20 +0000 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2013-04-24 15:01:20 +0000 |
commit | 623fb91ea95294c80ad9748e8959cb7d86568143 (patch) | |
tree | 865866d758af5e1223221af662f2597896f0ac80 | |
parent | 20365b87579947d7b099ad7eb65fcd7b33ce2397 (diff) |
use anonymous structs for iemnet_notif{y,ier}
cherry-picked from git commit 8e12855bcecbb7d086d3e464e1219fc689ad6b46
Author: IOhannes m zmölnig <zmoelnig@iem.at>
Date: Wed Apr 24 16:56:23 2013 +0200
C sucks....
svn path=/trunk/externals/iem/iemnet/; revision=17102
-rw-r--r-- | iemnet.h | 4 | ||||
-rw-r--r-- | iemnet_notify.c | 8 |
2 files changed, 6 insertions, 6 deletions
@@ -152,7 +152,7 @@ int iemnet__receiver_getsize(t_iemnet_receiver*); /** * opaque data type used for a notification server */ -typedef struct _iemnet_notifier t_iemnet_notifier; +#define t_iemnet_notifier struct _iemnet_notifier EXTERN_STRUCT _iemnet_notifier; t_iemnet_notifier*iemnet__notify_create(void); void iemnet__notify_destroy(t_iemnet_notifier*x); @@ -160,7 +160,7 @@ void iemnet__notify_destroy(t_iemnet_notifier*x); /** * opaque data type used for a notification client */ -typedef struct _iemnet_notify t_iemnet_notify; +#define t_iemnet_notify struct _iemnet_notify EXTERN_STRUCT _iemnet_notify; void iemnet__notify_remove(t_iemnet_notify*notify); /** diff --git a/iemnet_notify.c b/iemnet_notify.c index df1c9eb..6bf6a1b 100644 --- a/iemnet_notify.c +++ b/iemnet_notify.c @@ -33,19 +33,19 @@ /* for printf() debugging */ #include <stdio.h> -typedef struct _iemnet_notify{ +struct _iemnet_notify { void*data; t_iemnet_notifun fun; struct _iemnet_notifier*parent; struct _iemnet_notify*next; -} t_iemnet_notify; +}; static t_iemnet_notify*pollqueue=NULL; -typedef struct _iemnet_notifier { +struct _iemnet_notifier { int fd[2]; struct _iemnet_notify*nodes; -} t_iemnet_notifier; +}; static t_iemnet_notifier *masternotifier = NULL; |