ruby-changes:20139
From: kosaki <ko1@a...>
Date: Tue, 21 Jun 2011 21:31:36 +0900 (JST)
Subject: [ruby-changes:20139] kosaki:r32187 (trunk): * internal.h: move rb_thread_io_blocking_region() declaration
kosaki 2011-06-21 21:31:17 +0900 (Tue, 21 Jun 2011) New Revision: 32187 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32187 Log: * internal.h: move rb_thread_io_blocking_region() declaration from intern.h to internal.h. It's still experimental API and need more discussion. [ruby-dev:43698] * include/ruby/intern.h: ditto. * ext/socket/rubysocket.h: include internal.h. * ext/socket/depend: add internal.h dependency. * ext/socket/extconf.rb: add $INCFLAGS to topdir. Modified files: trunk/ChangeLog trunk/ext/socket/depend trunk/ext/socket/extconf.rb trunk/ext/socket/rubysocket.h trunk/include/ruby/intern.h trunk/internal.h Index: include/ruby/intern.h =================================================================== --- include/ruby/intern.h (revision 32186) +++ include/ruby/intern.h (revision 32187) @@ -806,7 +806,6 @@ int rb_thread_interrupted(VALUE thval); VALUE rb_thread_blocking_region(rb_blocking_function_t *func, void *data1, rb_unblock_function_t *ubf, void *data2); -VALUE rb_thread_io_blocking_region(rb_blocking_function_t *func, void *data1, int fd); #define RUBY_UBF_IO ((rb_unblock_function_t *)-1) #define RUBY_UBF_PROCESS ((rb_unblock_function_t *)-1) VALUE rb_mutex_new(void); Index: ChangeLog =================================================================== --- ChangeLog (revision 32186) +++ ChangeLog (revision 32187) @@ -1,3 +1,14 @@ +Tue Jun 21 21:27:34 2011 KOSAKI Motohiro <kosaki.motohiro@g...> + + * internal.h: move rb_thread_io_blocking_region() declaration + from intern.h to internal.h. It's still experimental API and + need more discussion. [ruby-dev:43698] + * include/ruby/intern.h: ditto. + + * ext/socket/rubysocket.h: include internal.h. + * ext/socket/depend: add internal.h dependency. + * ext/socket/extconf.rb: add $INCFLAGS to topdir. + Tue Jun 21 20:38:47 2011 Tadayoshi Funaba <tadf@d...> * ext/date/date_core.c (datetime_s_*): canonicalize 24 o'clock. Index: ext/socket/rubysocket.h =================================================================== --- ext/socket/rubysocket.h (revision 32186) +++ ext/socket/rubysocket.h (revision 32187) @@ -4,6 +4,7 @@ #include "ruby/ruby.h" #include "ruby/io.h" #include "ruby/util.h" +#include "internal.h" #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> Index: ext/socket/depend =================================================================== --- ext/socket/depend (revision 32186) +++ ext/socket/depend (revision 32187) @@ -1,6 +1,6 @@ SOCK_HEADERS = $(srcdir)/rubysocket.h $(hdrdir)/ruby/ruby.h $(arch_hdrdir)/ruby/config.h \ $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/io.h \ - $(srcdir)/addrinfo.h $(srcdir)/sockport.h constdefs.h + $(srcdir)/addrinfo.h $(srcdir)/sockport.h constdefs.h $(topdir)/internal.h init.o: init.c $(SOCK_HEADERS) constants.o: constants.c constdefs.c $(SOCK_HEADERS) Index: ext/socket/extconf.rb =================================================================== --- ext/socket/extconf.rb (revision 32186) +++ ext/socket/extconf.rb (revision 32187) @@ -1,5 +1,7 @@ require 'mkmf' +$INCFLAGS << " -I$(topdir) -I$(top_srcdir)" + case RUBY_PLATFORM when /(ms|bcc)win(32|64)|mingw/ test_func = "WSACleanup" Index: internal.h =================================================================== --- internal.h (revision 32186) +++ internal.h (revision 32187) @@ -187,6 +187,14 @@ /* miniprelude.c, prelude.c */ void Init_prelude(void); +#if defined __GNUC__ && __GNUC__ >= 4 +#pragma GCC visibility push(default) +#endif +VALUE rb_thread_io_blocking_region(rb_blocking_function_t *func, void *data1, int fd); +#if defined __GNUC__ && __GNUC__ >= 4 +#pragma GCC visibility pop +#endif + #if defined(__cplusplus) #if 0 { /* satisfy cc-mode */ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/