summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--include/ruby/intern.h8
-rw-r--r--thread.c16
-rw-r--r--win32/win32.c2
4 files changed, 20 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 1a8a923728..f2bf802688 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Sun May 15 23:45:11 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * include/ruby/intern.h: remove rb_fd_copy() to rb_fd_dup() and
+ rb_w32_fdcopy() to rb_w32_fd_dup().
+ * win32/win32.c: ditto.
+ * thread.c: ditto.
+
Sun May 15 22:26:39 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
* signal.c (rb_f_kill): accept '-SIGXXX' style signal with Symbol or
diff --git a/include/ruby/intern.h b/include/ruby/intern.h
index 781f4ce78f..ca8f7b984a 100644
--- a/include/ruby/intern.h
+++ b/include/ruby/intern.h
@@ -250,7 +250,7 @@ void rb_fd_zero(rb_fdset_t *);
void rb_fd_set(int, rb_fdset_t *);
void rb_fd_clr(int, rb_fdset_t *);
int rb_fd_isset(int, const rb_fdset_t *);
-void rb_fd_copy(rb_fdset_t *dst, const rb_fdset_t *src);
+void rb_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src);
int rb_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *);
#define rb_fd_ptr(f) ((f)->fdset)
@@ -269,8 +269,8 @@ void rb_fd_term(rb_fdset_t *);
void rb_fd_set(int, rb_fdset_t *);
#define rb_fd_clr(n, f) rb_w32_fdclr((n), (f)->fdset)
#define rb_fd_isset(n, f) rb_w32_fdisset((n), (f)->fdset)
-#define rb_fd_copy(d, s) rb_w32_fdcopy((d), (s))
-void rb_w32_fdcopy(rb_fdset_t *dst, const rb_fdset_t *src);
+#define rb_fd_dup(d, s) rb_w32_fd_dup((d), (s))
+void rb_w32_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src);
#define rb_fd_select(n, rfds, wfds, efds, timeout) rb_w32_select((n), (rfds) ? ((rb_fdset_t*)(rfds))->fdset : NULL, (wfds) ? ((rb_fdset_t*)(wfds))->fdset : NULL, (efds) ? ((rb_fdset_t*)(efds))->fdset: NULL, (timeout))
#define rb_fd_resize(n, f) ((void)(f))
@@ -284,7 +284,7 @@ typedef fd_set rb_fdset_t;
#define rb_fd_set(n, f) FD_SET((n), (f))
#define rb_fd_clr(n, f) FD_CLR((n), (f))
#define rb_fd_isset(n, f) FD_ISSET((n), (f))
-#define rb_fd_copy(d, s) (*(d) = *(s))
+#define rb_fd_dup(d, s) (*(d) = *(s))
#define rb_fd_resize(n, f) ((void)(f))
#define rb_fd_ptr(f) (f)
#define rb_fd_init(f) FD_ZERO(f)
diff --git a/thread.c b/thread.c
index 182feb31a1..88c396e185 100644
--- a/thread.c
+++ b/thread.c
@@ -2392,7 +2392,7 @@ rb_fd_isset(int n, const rb_fdset_t *fds)
}
void
-rb_fd_copy(rb_fdset_t *dst, const rb_fdset_t *src)
+rb_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src)
{
size_t size = howmany(rb_fd_max(src), NFDBITS) * sizeof(fd_mask);
@@ -2446,7 +2446,7 @@ void
rb_fd_init_copy(rb_fdset_t *dst, rb_fdset_t *src)
{
rb_fd_init(dst);
- rb_fd_copy(dst, src);
+ rb_fd_dup(dst, src);
}
void
@@ -2567,11 +2567,11 @@ do_select(int n, rb_fdset_t *read, rb_fdset_t *write, rb_fdset_t *except,
if (result != 0) break;
if (read)
- rb_fd_copy(read, &orig_read);
+ rb_fd_dup(read, &orig_read);
if (write)
- rb_fd_copy(write, &orig_write);
+ rb_fd_dup(write, &orig_write);
if (except)
- rb_fd_copy(except, &orig_except);
+ rb_fd_dup(except, &orig_except);
if (timeout) {
struct timeval elapsed;
gettimeofday(&elapsed, NULL);
@@ -2603,11 +2603,11 @@ do_select(int n, rb_fdset_t *read, rb_fdset_t *write, rb_fdset_t *except,
case ERESTART:
#endif
if (read)
- rb_fd_copy(read, &orig_read);
+ rb_fd_dup(read, &orig_read);
if (write)
- rb_fd_copy(write, &orig_write);
+ rb_fd_dup(write, &orig_write);
if (except)
- rb_fd_copy(except, &orig_except);
+ rb_fd_dup(except, &orig_except);
if (timeout) {
double d = limit - timeofday();
diff --git a/win32/win32.c b/win32/win32.c
index 6d04caa649..d636b74e2d 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -2368,7 +2368,7 @@ rb_w32_fdisset(int fd, fd_set *set)
}
void
-rb_w32_fdcopy(rb_fdset_t *dst, const rb_fdset_t *src)
+rb_w32_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src)
{
if ((UINT)dst->capa < src->fdset->fd_count) {
dst->capa = (src->fdset->fd_count / FD_SETSIZE + 1) * FD_SETSIZE;