summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuo Jinghua <sunmoon1997@gmail.com>2009-10-31 15:05:40 +0800
committerLuo Jinghua <sunmoon1997@gmail.com>2009-10-31 15:05:40 +0800
commitd84c5588a553b85c7a6a319c3c274bb5b5005a80 (patch)
tree693132669ac948909d59bf89b87096b7d6012239
parentbb31aea5a25a9b3b4861883fd9adbcb9f63c90d6 (diff)
milkway: actully add/remove fds
-rw-r--r--milkway/mw-poll-select.c8
-rw-r--r--milkway/mw-poll-sys.c8
-rw-r--r--milkway/mw-poll-win32.c8
3 files changed, 24 insertions, 0 deletions
diff --git a/milkway/mw-poll-select.c b/milkway/mw-poll-select.c
index c93efaf..53de9a9 100644
--- a/milkway/mw-poll-select.c
+++ b/milkway/mw-poll-select.c
@@ -78,6 +78,10 @@ mw_poll_select_add_fd(mw_poll_t *super,
{
mw_poll_select_t *self = (mw_poll_select_t*)super;
+ if (!MW_SUPER_TYPE_MTH(super, MW_POLL_SELECT_TYPE,
+ mw_poll_type_t, add_fd)
+ (super, fd, reterr))
+ return MW_FALSE;
return MW_TRUE;
}
@@ -88,6 +92,10 @@ mw_poll_select_remove_fd(mw_poll_t *super,
{
mw_poll_select_t *self = (mw_poll_select_t*)super;
+ if (!MW_SUPER_TYPE_MTH(super, MW_POLL_SELECT_TYPE,
+ mw_poll_type_t, remove_fd)
+ (super, fd, reterr))
+ return MW_FALSE;
return MW_TRUE;
}
diff --git a/milkway/mw-poll-sys.c b/milkway/mw-poll-sys.c
index e2078b2..21e7355 100644
--- a/milkway/mw-poll-sys.c
+++ b/milkway/mw-poll-sys.c
@@ -74,6 +74,10 @@ mw_poll_sys_add_fd(mw_poll_t *super,
{
mw_poll_sys_t *self = (mw_poll_sys_t*)super;
+ if (!MW_SUPER_TYPE_MTH(super, MW_POLL_SYS_TYPE,
+ mw_poll_type_t, add_fd)
+ (super, fd, reterr))
+ return MW_FALSE;
return MW_TRUE;
}
@@ -84,6 +88,10 @@ mw_poll_sys_remove_fd(mw_poll_t *super,
{
mw_poll_sys_t *self = (mw_poll_sys_t*)super;
+ if (!MW_SUPER_TYPE_MTH(super, MW_POLL_SYS_TYPE,
+ mw_poll_type_t, remove_fd)
+ (super, fd, reterr))
+ return MW_FALSE;
return MW_TRUE;
}
diff --git a/milkway/mw-poll-win32.c b/milkway/mw-poll-win32.c
index 579b790..9e271cb 100644
--- a/milkway/mw-poll-win32.c
+++ b/milkway/mw-poll-win32.c
@@ -53,6 +53,10 @@ mw_poll_win32_add_fd(mw_poll_t *super,
{
mw_poll_win32_t *self = (mw_poll_win32_t*)super;
+ if (!MW_SUPER_TYPE_MTH(super, MW_POLL_WIN32_TYPE,
+ mw_poll_type_t, add_fd)
+ (super, fd, reterr))
+ return MW_FALSE;
return MW_TRUE;
}
@@ -63,6 +67,10 @@ mw_poll_win32_remove_fd(mw_poll_t *super,
{
mw_poll_win32_t *self = (mw_poll_win32_t*)super;
+ if (!MW_SUPER_TYPE_MTH(super, MW_POLL_WIN32_TYPE,
+ mw_poll_type_t, remove_fd)
+ (super, fd, reterr))
+ return MW_FALSE;
return MW_TRUE;
}