summaryrefslogtreecommitdiff
path: root/ext/socket/socket.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-02 08:46:26 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-02 08:46:26 +0000
commite4b7c0e8a36c3788f180202f0511b3f70d566c6f (patch)
treef84716872f0cbfd6c16f1039220f1c265d1f3e84 /ext/socket/socket.c
parentb5aebd12c003342a68ca756b2a43c17b1ff254c1 (diff)
* ext/socket/mkconstants.rb: rename family_to_str to intern_family.
it returns ID now. * ext/socket/socket.c (ipaddr): use intern_family. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/socket.c')
-rw-r--r--ext/socket/socket.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 76cb4ae0454..236356e828c 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -1061,10 +1061,11 @@ ipaddr(struct sockaddr *sockaddr, int norevlookup)
VALUE ary;
int error;
char hbuf[1024], pbuf[1024];
+ ID id;
- family = family_to_str(sockaddr->sa_family);
- if (!NIL_P(family)) {
- family = rb_str_dup(family);
+ id = intern_family(sockaddr->sa_family);
+ if (id) {
+ family = rb_str_dup(rb_id2str(id));
}
else {
sprintf(pbuf, "unknown:%d", sockaddr->sa_family);