diff options
author | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-07 13:36:08 +0000 |
---|---|---|
committer | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-07 13:36:08 +0000 |
commit | 156ccab7964ae35fa2bcdb0e0a9c5f11192aa848 (patch) | |
tree | 9dd75fe32f964e09fcb9e7544c5f55a105b897f8 /include/ruby | |
parent | ddcd5c2939771129c779bad077bbacc59cd7679a (diff) | |
download | ruby-156ccab7964ae35fa2bcdb0e0a9c5f11192aa848.tar.gz |
* thread.c (rb_fd_init_copy): new internal api. It provide efficient
copy constructor semantics.
* thread.c (do_select): use rb_fd_init_copy().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby')
-rw-r--r-- | include/ruby/intern.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/ruby/intern.h b/include/ruby/intern.h index efb2814e6f..84a8a46ed1 100644 --- a/include/ruby/intern.h +++ b/include/ruby/intern.h @@ -288,6 +288,7 @@ typedef fd_set rb_fdset_t; #define rb_fd_resize(n, f) ((void)(f)) #define rb_fd_ptr(f) (f) #define rb_fd_init(f) FD_ZERO(f) +#define rb_fd_init_copy(d, s) (*(d) = *(s)) #define rb_fd_term(f) ((void)(f)) #define rb_fd_max(f) FD_SETSIZE #define rb_fd_select(n, rfds, wfds, efds, timeout) select((n), (rfds), (wfds), (efds), (timeout)) |