mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/socket: use rsock_ prefix for internal initialization functions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
91533255f8
commit
a4fa54a10a
16 changed files with 43 additions and 39 deletions
|
@ -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>
|
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.
|
* proc.c (rb_method_location): return attr's location if it is setup.
|
||||||
|
|
|
@ -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.
|
* It contains socket family, cmsg level, cmsg type and cmsg data.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
Init_ancdata(void)
|
rsock_init_ancdata(void)
|
||||||
{
|
{
|
||||||
#if defined(HAVE_ST_MSG_CONTROL)
|
#if defined(HAVE_ST_MSG_CONTROL)
|
||||||
rb_cAncillaryData = rb_define_class_under(rb_cSocket, "AncillaryData", rb_cObject);
|
rb_cAncillaryData = rb_define_class_under(rb_cSocket, "AncillaryData", rb_cObject);
|
||||||
|
|
|
@ -736,7 +736,7 @@ bsock_do_not_rev_lookup_set(VALUE self, VALUE val)
|
||||||
* BasicSocket is the super class for the all socket classes.
|
* BasicSocket is the super class for the all socket classes.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
Init_basicsocket(void)
|
rsock_init_basicsocket(void)
|
||||||
{
|
{
|
||||||
rb_cBasicSocket = rb_define_class("BasicSocket", rb_cIO);
|
rb_cBasicSocket = rb_define_class("BasicSocket", rb_cIO);
|
||||||
rb_undef_method(rb_cBasicSocket, "initialize");
|
rb_undef_method(rb_cBasicSocket, "initialize");
|
||||||
|
|
|
@ -138,7 +138,7 @@ rsock_shutdown_how_arg(VALUE how)
|
||||||
* Socket::Constants module
|
* Socket::Constants module
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
Init_socket_constants(void)
|
rsock_init_socket_constants(void)
|
||||||
{
|
{
|
||||||
/* constants */
|
/* constants */
|
||||||
init_constants();
|
init_constants();
|
||||||
|
|
|
@ -552,18 +552,18 @@ rsock_getfamily(int sockfd)
|
||||||
* SocketError is the error class for socket.
|
* SocketError is the error class for socket.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
Init_socket_init()
|
rsock_init_socket_init()
|
||||||
{
|
{
|
||||||
rb_eSocket = rb_define_class("SocketError", rb_eStandardError);
|
rb_eSocket = rb_define_class("SocketError", rb_eStandardError);
|
||||||
Init_ipsocket();
|
rsock_init_ipsocket();
|
||||||
Init_tcpsocket();
|
rsock_init_tcpsocket();
|
||||||
Init_tcpserver();
|
rsock_init_tcpserver();
|
||||||
Init_sockssocket();
|
rsock_init_sockssocket();
|
||||||
Init_udpsocket();
|
rsock_init_udpsocket();
|
||||||
Init_unixsocket();
|
rsock_init_unixsocket();
|
||||||
Init_unixserver();
|
rsock_init_unixserver();
|
||||||
Init_sockopt();
|
rsock_init_sockopt();
|
||||||
Init_ancdata();
|
rsock_init_ancdata();
|
||||||
Init_addrinfo();
|
rsock_init_addrinfo();
|
||||||
Init_socket_constants();
|
rsock_init_socket_constants();
|
||||||
}
|
}
|
||||||
|
|
|
@ -289,7 +289,7 @@ ip_s_getaddress(VALUE obj, VALUE host)
|
||||||
* IPSocket is the super class of TCPSocket and UDPSocket.
|
* IPSocket is the super class of TCPSocket and UDPSocket.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
Init_ipsocket(void)
|
rsock_init_ipsocket(void)
|
||||||
{
|
{
|
||||||
rb_cIPSocket = rb_define_class("IPSocket", rb_cBasicSocket);
|
rb_cIPSocket = rb_define_class("IPSocket", rb_cBasicSocket);
|
||||||
rb_define_method(rb_cIPSocket, "addr", ip_addr, -1);
|
rb_define_method(rb_cIPSocket, "addr", ip_addr, -1);
|
||||||
|
|
|
@ -666,7 +666,7 @@ sockopt_unpack(VALUE self, VALUE template)
|
||||||
* It contains socket family, protocol level, option name and option value.
|
* It contains socket family, protocol level, option name and option value.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
Init_sockopt(void)
|
rsock_init_sockopt(void)
|
||||||
{
|
{
|
||||||
rb_cSockOpt = rb_define_class_under(rb_cSocket, "Option", rb_cObject);
|
rb_cSockOpt = rb_define_class_under(rb_cSocket, "Option", rb_cObject);
|
||||||
rb_define_method(rb_cSockOpt, "initialize", sockopt_initialize, 4);
|
rb_define_method(rb_cSockOpt, "initialize", sockopt_initialize, 4);
|
||||||
|
|
|
@ -2116,7 +2116,7 @@ rsock_io_socket_addrinfo(VALUE io, struct sockaddr *addr, socklen_t len)
|
||||||
* Addrinfo class
|
* Addrinfo class
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
Init_addrinfo(void)
|
rsock_init_addrinfo(void)
|
||||||
{
|
{
|
||||||
rb_cAddrinfo = rb_define_class("Addrinfo", rb_cData);
|
rb_cAddrinfo = rb_define_class("Addrinfo", rb_cData);
|
||||||
rb_define_alloc_func(rb_cAddrinfo, addrinfo_s_allocate);
|
rb_define_alloc_func(rb_cAddrinfo, addrinfo_s_allocate);
|
||||||
|
|
|
@ -273,18 +273,18 @@ VALUE rsock_bsock_recvmsg_nonblock(int argc, VALUE *argv, VALUE sock);
|
||||||
void rsock_discard_cmsg_resource(struct msghdr *mh);
|
void rsock_discard_cmsg_resource(struct msghdr *mh);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void Init_basicsocket(void);
|
void rsock_init_basicsocket(void);
|
||||||
void Init_ipsocket(void);
|
void rsock_init_ipsocket(void);
|
||||||
void Init_tcpsocket(void);
|
void rsock_init_tcpsocket(void);
|
||||||
void Init_tcpserver(void);
|
void rsock_init_tcpserver(void);
|
||||||
void Init_sockssocket(void);
|
void rsock_init_sockssocket(void);
|
||||||
void Init_udpsocket(void);
|
void rsock_init_udpsocket(void);
|
||||||
void Init_unixsocket(void);
|
void rsock_init_unixsocket(void);
|
||||||
void Init_unixserver(void);
|
void rsock_init_unixserver(void);
|
||||||
void Init_socket_constants(void);
|
void rsock_init_socket_constants(void);
|
||||||
void Init_ancdata(void);
|
void rsock_init_ancdata(void);
|
||||||
void Init_addrinfo(void);
|
void rsock_init_addrinfo(void);
|
||||||
void Init_sockopt(void);
|
void rsock_init_sockopt(void);
|
||||||
void Init_socket_init(void);
|
void rsock_init_socket_init(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1830,11 +1830,11 @@ socket_s_ip_address_list(VALUE self)
|
||||||
void
|
void
|
||||||
Init_socket()
|
Init_socket()
|
||||||
{
|
{
|
||||||
Init_basicsocket();
|
rsock_init_basicsocket();
|
||||||
|
|
||||||
rb_cSocket = rb_define_class("Socket", rb_cBasicSocket);
|
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, "initialize", sock_initialize, -1);
|
||||||
rb_define_method(rb_cSocket, "connect", sock_connect, 1);
|
rb_define_method(rb_cSocket, "connect", sock_connect, 1);
|
||||||
|
|
|
@ -46,7 +46,7 @@ socks_s_close(VALUE sock)
|
||||||
* SOCKSSocket class
|
* SOCKSSocket class
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
Init_sockssocket(void)
|
rsock_init_sockssocket(void)
|
||||||
{
|
{
|
||||||
#ifdef SOCKS
|
#ifdef SOCKS
|
||||||
rb_cSOCKSSocket = rb_define_class("SOCKSSocket", rb_cTCPSocket);
|
rb_cSOCKSSocket = rb_define_class("SOCKSSocket", rb_cTCPSocket);
|
||||||
|
|
|
@ -134,7 +134,7 @@ tcp_sysaccept(VALUE sock)
|
||||||
* TCPServer represents a TCP/IP server socket.
|
* TCPServer represents a TCP/IP server socket.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
Init_tcpserver(void)
|
rsock_init_tcpserver(void)
|
||||||
{
|
{
|
||||||
rb_cTCPServer = rb_define_class("TCPServer", rb_cTCPSocket);
|
rb_cTCPServer = rb_define_class("TCPServer", rb_cTCPSocket);
|
||||||
rb_define_method(rb_cTCPServer, "accept", tcp_accept, 0);
|
rb_define_method(rb_cTCPServer, "accept", tcp_accept, 0);
|
||||||
|
|
|
@ -61,7 +61,7 @@ tcp_s_gethostbyname(VALUE obj, VALUE host)
|
||||||
* TCPSocket represents a TCP/IP client socket.
|
* TCPSocket represents a TCP/IP client socket.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
Init_tcpsocket(void)
|
rsock_init_tcpsocket(void)
|
||||||
{
|
{
|
||||||
rb_cTCPSocket = rb_define_class("TCPSocket", rb_cIPSocket);
|
rb_cTCPSocket = rb_define_class("TCPSocket", rb_cIPSocket);
|
||||||
rb_define_singleton_method(rb_cTCPSocket, "gethostbyname", tcp_s_gethostbyname, 1);
|
rb_define_singleton_method(rb_cTCPSocket, "gethostbyname", tcp_s_gethostbyname, 1);
|
||||||
|
|
|
@ -252,7 +252,7 @@ udp_recvfrom_nonblock(int argc, VALUE *argv, VALUE sock)
|
||||||
* UDPSocket represents a UDP/IP socket.
|
* UDPSocket represents a UDP/IP socket.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
Init_udpsocket(void)
|
rsock_init_udpsocket(void)
|
||||||
{
|
{
|
||||||
rb_cUDPSocket = rb_define_class("UDPSocket", rb_cIPSocket);
|
rb_cUDPSocket = rb_define_class("UDPSocket", rb_cIPSocket);
|
||||||
rb_define_method(rb_cUDPSocket, "initialize", udp_init, -1);
|
rb_define_method(rb_cUDPSocket, "initialize", udp_init, -1);
|
||||||
|
|
|
@ -141,7 +141,7 @@ unix_sysaccept(VALUE sock)
|
||||||
* UNIXServer represents a UNIX domain stream server socket.
|
* UNIXServer represents a UNIX domain stream server socket.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
Init_unixserver(void)
|
rsock_init_unixserver(void)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_SYS_UN_H
|
#ifdef HAVE_SYS_UN_H
|
||||||
rb_cUNIXServer = rb_define_class("UNIXServer", rb_cUNIXSocket);
|
rb_cUNIXServer = rb_define_class("UNIXServer", rb_cUNIXSocket);
|
||||||
|
|
|
@ -490,7 +490,7 @@ unix_s_socketpair(int argc, VALUE *argv, VALUE klass)
|
||||||
* UNIXSocket represents a UNIX domain stream client socket.
|
* UNIXSocket represents a UNIX domain stream client socket.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
Init_unixsocket(void)
|
rsock_init_unixsocket(void)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_SYS_UN_H
|
#ifdef HAVE_SYS_UN_H
|
||||||
rb_cUNIXSocket = rb_define_class("UNIXSocket", rb_cBasicSocket);
|
rb_cUNIXSocket = rb_define_class("UNIXSocket", rb_cBasicSocket);
|
||||||
|
|
Loading…
Reference in a new issue