[ruby-cvs:52192] akr:r45047 (trunk): * ext/socket: Bypass getaddrinfo() if node and serv are numeric.

akr at ruby-lang.org akr at ruby-lang.org
Wed Feb 19 19:37:43 JST 2014


akr	2014-02-19 19:37:43 +0900 (Wed, 19 Feb 2014)

  New Revision: 45047

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45047

  Log:
    * ext/socket: Bypass getaddrinfo() if node and serv are numeric.
      Reporeted by Naotoshi Seo.  [ruby-core:60801] [Bug #9525]
    
    * ext/socket/extconf.rb: Detect struct sockaddr_in6.sin6_len.
    
    * ext/socket/sockport.h (SET_SIN6_LEN): New macro.
      (INIT_SOCKADDR_IN6): Ditto.
    
    * ext/socket/rubysocket.h (struct rb_addrinfo): Add
      allocated_by_malloc field.
    
    * ext/socket/raddrinfo.c (numeric_getaddrinfo): New function.
      (rb_getaddrinfo): Call numeric_getaddrinfo at first.
      (rb_freeaddrinfo): Free struct addrinfo properly when it is
      allocated by numeric_getaddrinfo.

  Modified files:
    trunk/ChangeLog
    trunk/ext/socket/extconf.rb
    trunk/ext/socket/raddrinfo.c
    trunk/ext/socket/rubysocket.h
    trunk/ext/socket/sockport.h


More information about the ruby-cvs mailing list