summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--ext/socket/ancdata.c2
-rw-r--r--ext/socket/basicsocket.c2
-rw-r--r--ext/socket/constants.c2
-rw-r--r--ext/socket/init.c24
-rw-r--r--ext/socket/ipsocket.c2
-rw-r--r--ext/socket/option.c2
-rw-r--r--ext/socket/raddrinfo.c2
-rw-r--r--ext/socket/rubysocket.h26
-rw-r--r--ext/socket/socket.c4
-rw-r--r--ext/socket/sockssocket.c2
-rw-r--r--ext/socket/tcpserver.c2
-rw-r--r--ext/socket/tcpsocket.c2
-rw-r--r--ext/socket/udpsocket.c2
-rw-r--r--ext/socket/unixserver.c2
-rw-r--r--ext/socket/unixsocket.c2
16 files changed, 43 insertions, 39 deletions
diff --git a/ChangeLog b/ChangeLog
index 730a55d..ed87858 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Tue Mar 23 01:13:59 2010 Tanaka Akira <akr@fsij.org>
+
+ * ext/socket: use rsock_ prefix for internal initialization functions.
+
Mon Mar 22 20:32:22 2010 wanabe <s.wanabe@gmail.com>
* proc.c (rb_method_location): return attr's location if it is setup.
diff --git a/ext/socket/ancdata.c b/ext/socket/ancdata.c
index 0d38460..a1d1219 100644
--- a/ext/socket/ancdata.c
+++ b/ext/socket/ancdata.c
@@ -1775,7 +1775,7 @@ rsock_bsock_recvmsg_nonblock(int argc, VALUE *argv, VALUE sock)
* It contains socket family, cmsg level, cmsg type and cmsg data.
*/
void
-Init_ancdata(void)
+rsock_init_ancdata(void)
{
#if defined(HAVE_ST_MSG_CONTROL)
rb_cAncillaryData = rb_define_class_under(rb_cSocket, "AncillaryData", rb_cObject);
diff --git a/ext/socket/basicsocket.c b/ext/socket/basicsocket.c
index 60db310..a4c42ee 100644
--- a/ext/socket/basicsocket.c
+++ b/ext/socket/basicsocket.c
@@ -736,7 +736,7 @@ bsock_do_not_rev_lookup_set(VALUE self, VALUE val)
* BasicSocket is the super class for the all socket classes.
*/
void
-Init_basicsocket(void)
+rsock_init_basicsocket(void)
{
rb_cBasicSocket = rb_define_class("BasicSocket", rb_cIO);
rb_undef_method(rb_cBasicSocket, "initialize");
diff --git a/ext/socket/constants.c b/ext/socket/constants.c
index 4fdc40d..c765d75 100644
--- a/ext/socket/constants.c
+++ b/ext/socket/constants.c
@@ -138,7 +138,7 @@ rsock_shutdown_how_arg(VALUE how)
* Socket::Constants module
*/
void
-Init_socket_constants(void)
+rsock_init_socket_constants(void)
{
/* constants */
init_constants();
diff --git a/ext/socket/init.c b/ext/socket/init.c
index d744f8c..4c7926b 100644
--- a/ext/socket/init.c
+++ b/ext/socket/init.c
@@ -552,18 +552,18 @@ rsock_getfamily(int sockfd)
* SocketError is the error class for socket.
*/
void
-Init_socket_init()
+rsock_init_socket_init()
{
rb_eSocket = rb_define_class("SocketError", rb_eStandardError);
- Init_ipsocket();
- Init_tcpsocket();
- Init_tcpserver();
- Init_sockssocket();
- Init_udpsocket();
- Init_unixsocket();
- Init_unixserver();
- Init_sockopt();
- Init_ancdata();
- Init_addrinfo();
- Init_socket_constants();
+ rsock_init_ipsocket();
+ rsock_init_tcpsocket();
+ rsock_init_tcpserver();
+ rsock_init_sockssocket();
+ rsock_init_udpsocket();
+ rsock_init_unixsocket();
+ rsock_init_unixserver();
+ rsock_init_sockopt();
+ rsock_init_ancdata();
+ rsock_init_addrinfo();
+ rsock_init_socket_constants();
}
diff --git a/ext/socket/ipsocket.c b/ext/socket/ipsocket.c
index c1f329b..447ae40 100644
--- a/ext/socket/ipsocket.c
+++ b/ext/socket/ipsocket.c
@@ -289,7 +289,7 @@ ip_s_getaddress(VALUE obj, VALUE host)
* IPSocket is the super class of TCPSocket and UDPSocket.
*/
void
-Init_ipsocket(void)
+rsock_init_ipsocket(void)
{
rb_cIPSocket = rb_define_class("IPSocket", rb_cBasicSocket);
rb_define_method(rb_cIPSocket, "addr", ip_addr, -1);
diff --git a/ext/socket/option.c b/ext/socket/option.c
index 4be651f..dde8b41 100644
--- a/ext/socket/option.c
+++ b/ext/socket/option.c
@@ -666,7 +666,7 @@ sockopt_unpack(VALUE self, VALUE template)
* It contains socket family, protocol level, option name and option value.
*/
void
-Init_sockopt(void)
+rsock_init_sockopt(void)
{
rb_cSockOpt = rb_define_class_under(rb_cSocket, "Option", rb_cObject);
rb_define_method(rb_cSockOpt, "initialize", sockopt_initialize, 4);
diff --git a/ext/socket/raddrinfo.c b/ext/socket/raddrinfo.c
index 822ab17..b035f2e 100644
--- a/ext/socket/raddrinfo.c
+++ b/ext/socket/raddrinfo.c
@@ -2116,7 +2116,7 @@ rsock_io_socket_addrinfo(VALUE io, struct sockaddr *addr, socklen_t len)
* Addrinfo class
*/
void
-Init_addrinfo(void)
+rsock_init_addrinfo(void)
{
rb_cAddrinfo = rb_define_class("Addrinfo", rb_cData);
rb_define_alloc_func(rb_cAddrinfo, addrinfo_s_allocate);
diff --git a/ext/socket/rubysocket.h b/ext/socket/rubysocket.h
index c5b8cd7..1ef26e6 100644
--- a/ext/socket/rubysocket.h
+++ b/ext/socket/rubysocket.h
@@ -273,18 +273,18 @@ VALUE rsock_bsock_recvmsg_nonblock(int argc, VALUE *argv, VALUE sock);
void rsock_discard_cmsg_resource(struct msghdr *mh);
#endif
-void Init_basicsocket(void);
-void Init_ipsocket(void);
-void Init_tcpsocket(void);
-void Init_tcpserver(void);
-void Init_sockssocket(void);
-void Init_udpsocket(void);
-void Init_unixsocket(void);
-void Init_unixserver(void);
-void Init_socket_constants(void);
-void Init_ancdata(void);
-void Init_addrinfo(void);
-void Init_sockopt(void);
-void Init_socket_init(void);
+void rsock_init_basicsocket(void);
+void rsock_init_ipsocket(void);
+void rsock_init_tcpsocket(void);
+void rsock_init_tcpserver(void);
+void rsock_init_sockssocket(void);
+void rsock_init_udpsocket(void);
+void rsock_init_unixsocket(void);
+void rsock_init_unixserver(void);
+void rsock_init_socket_constants(void);
+void rsock_init_ancdata(void);
+void rsock_init_addrinfo(void);
+void rsock_init_sockopt(void);
+void rsock_init_socket_init(void);
#endif
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 66dd5d9..204f81a 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -1830,11 +1830,11 @@ socket_s_ip_address_list(VALUE self)
void
Init_socket()
{
- Init_basicsocket();
+ rsock_init_basicsocket();
rb_cSocket = rb_define_class("Socket", rb_cBasicSocket);
- Init_socket_init();
+ rsock_init_socket_init();
rb_define_method(rb_cSocket, "initialize", sock_initialize, -1);
rb_define_method(rb_cSocket, "connect", sock_connect, 1);
diff --git a/ext/socket/sockssocket.c b/ext/socket/sockssocket.c
index 84397ad..cbe8792 100644
--- a/ext/socket/sockssocket.c
+++ b/ext/socket/sockssocket.c
@@ -46,7 +46,7 @@ socks_s_close(VALUE sock)
* SOCKSSocket class
*/
void
-Init_sockssocket(void)
+rsock_init_sockssocket(void)
{
#ifdef SOCKS
rb_cSOCKSSocket = rb_define_class("SOCKSSocket", rb_cTCPSocket);
diff --git a/ext/socket/tcpserver.c b/ext/socket/tcpserver.c
index bd5701f..faa5ad5 100644
--- a/ext/socket/tcpserver.c
+++ b/ext/socket/tcpserver.c
@@ -134,7 +134,7 @@ tcp_sysaccept(VALUE sock)
* TCPServer represents a TCP/IP server socket.
*/
void
-Init_tcpserver(void)
+rsock_init_tcpserver(void)
{
rb_cTCPServer = rb_define_class("TCPServer", rb_cTCPSocket);
rb_define_method(rb_cTCPServer, "accept", tcp_accept, 0);
diff --git a/ext/socket/tcpsocket.c b/ext/socket/tcpsocket.c
index fb51a01..42d75d6 100644
--- a/ext/socket/tcpsocket.c
+++ b/ext/socket/tcpsocket.c
@@ -61,7 +61,7 @@ tcp_s_gethostbyname(VALUE obj, VALUE host)
* TCPSocket represents a TCP/IP client socket.
*/
void
-Init_tcpsocket(void)
+rsock_init_tcpsocket(void)
{
rb_cTCPSocket = rb_define_class("TCPSocket", rb_cIPSocket);
rb_define_singleton_method(rb_cTCPSocket, "gethostbyname", tcp_s_gethostbyname, 1);
diff --git a/ext/socket/udpsocket.c b/ext/socket/udpsocket.c
index 12b910d..e0ce443 100644
--- a/ext/socket/udpsocket.c
+++ b/ext/socket/udpsocket.c
@@ -252,7 +252,7 @@ udp_recvfrom_nonblock(int argc, VALUE *argv, VALUE sock)
* UDPSocket represents a UDP/IP socket.
*/
void
-Init_udpsocket(void)
+rsock_init_udpsocket(void)
{
rb_cUDPSocket = rb_define_class("UDPSocket", rb_cIPSocket);
rb_define_method(rb_cUDPSocket, "initialize", udp_init, -1);
diff --git a/ext/socket/unixserver.c b/ext/socket/unixserver.c
index 86447e8..ef830bc 100644
--- a/ext/socket/unixserver.c
+++ b/ext/socket/unixserver.c
@@ -141,7 +141,7 @@ unix_sysaccept(VALUE sock)
* UNIXServer represents a UNIX domain stream server socket.
*/
void
-Init_unixserver(void)
+rsock_init_unixserver(void)
{
#ifdef HAVE_SYS_UN_H
rb_cUNIXServer = rb_define_class("UNIXServer", rb_cUNIXSocket);
diff --git a/ext/socket/unixsocket.c b/ext/socket/unixsocket.c
index 8eca0d5..907f89c 100644
--- a/ext/socket/unixsocket.c
+++ b/ext/socket/unixsocket.c
@@ -490,7 +490,7 @@ unix_s_socketpair(int argc, VALUE *argv, VALUE klass)
* UNIXSocket represents a UNIX domain stream client socket.
*/
void
-Init_unixsocket(void)
+rsock_init_unixsocket(void)
{
#ifdef HAVE_SYS_UN_H
rb_cUNIXSocket = rb_define_class("UNIXSocket", rb_cBasicSocket);