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>
|
||||
|
||||
* 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.
|
||||
*/
|
||||
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);
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue