1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/socket/raddrinfo.c (str_is_number): renamed from str_isnumber to

avoid confusion to str_isnumber in ext/socket/getaddrinfo.c.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2010-06-23 15:05:25 +00:00
parent 70003c05a7
commit 512a35693b
2 changed files with 9 additions and 4 deletions

View file

@ -1,3 +1,8 @@
Wed Jun 23 23:49:21 2010 Tanaka Akira <akr@fsij.org>
* ext/socket/raddrinfo.c (str_is_number): renamed from str_isnumber to
avoid confusion to str_isnumber in ext/socket/getaddrinfo.c.
Wed Jun 23 23:45:31 2010 Yusuke Endoh <mame@tsg.ne.jp>
* NEWS (stringio): new methods. [ruby-dev:41687] [Bug #3469]

View file

@ -97,7 +97,7 @@ ruby_getnameinfo__aix(const struct sockaddr *sa, size_t salen,
ruby_getnameinfo__aix((sa), (salen), (host), (hostlen), (serv), (servlen), (flags))
#endif
static int str_isnumber(const char *);
static int str_is_number(const char *);
#if defined(__APPLE__)
/* fix [ruby-core:29427] */
@ -110,7 +110,7 @@ ruby_getaddrinfo__darwin(const char *nodename, const char *servname,
tmp_servname = servname;
MEMCPY(&tmp_hints, hints, struct addrinfo, 1);
if (nodename && servname) {
if (str_isnumber(tmp_servname) && atoi(servname) == 0) {
if (str_is_number(tmp_servname) && atoi(servname) == 0) {
tmp_servname = NULL;
#ifdef AI_NUMERICSERV
if (tmp_hints.ai_flags) tmp_hints.ai_flags &= ~AI_NUMERICSERV;
@ -239,7 +239,7 @@ make_inetaddr(unsigned int host, char *buf, size_t len)
}
static int
str_isnumber(const char *p)
str_is_number(const char *p)
{
char *ep;
@ -329,7 +329,7 @@ rsock_getaddrinfo(VALUE host, VALUE port, struct addrinfo *hints, int socktype_h
hostp = host_str(host, hbuf, sizeof(hbuf), &additional_flags);
portp = port_str(port, pbuf, sizeof(pbuf), &additional_flags);
if (socktype_hack && hints->ai_socktype == 0 && str_isnumber(portp)) {
if (socktype_hack && hints->ai_socktype == 0 && str_is_number(portp)) {
hints->ai_socktype = SOCK_DGRAM;
}
hints->ai_flags |= additional_flags;