diff --git a/ChangeLog b/ChangeLog index bcd85c7392..ae12222e64 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +Mon Feb 9 23:04:27 2009 Tanaka Akira + + * ext/socket/mkconstants.rb: rename level_to_int to iplevel_to_int. + rename intern_level to intern_iplevel. + + * ext/socket/constants.c: follow the renaming. + + * ext/socket/option.c: ditto. + + * ext/socket/ancdata.c: ditto. + Mon Feb 9 22:52:13 2009 Tanaka Akira * ext/socket/rubysocket.h (level_arg): add family argument. diff --git a/ext/socket/ancdata.c b/ext/socket/ancdata.c index 06ec546646..27b15b25fc 100644 --- a/ext/socket/ancdata.c +++ b/ext/socket/ancdata.c @@ -605,7 +605,7 @@ ancillary_inspect(VALUE self) else rb_str_catf(ret, "family:%d", family); - level_id = intern_level(level); + level_id = intern_iplevel(level); if (level_id) rb_str_catf(ret, " %s", rb_id2name(level_id)); else diff --git a/ext/socket/constants.c b/ext/socket/constants.c index 3b7906f890..aaedfa1962 100644 --- a/ext/socket/constants.c +++ b/ext/socket/constants.c @@ -61,7 +61,7 @@ int level_arg(int family, VALUE level) { /* convert SOL_SOCKET, IPPROTO_TCP, etc. */ - return constant_arg(level, level_to_int, "unknown protocol level"); + return constant_arg(level, iplevel_to_int, "unknown protocol level"); } int diff --git a/ext/socket/mkconstants.rb b/ext/socket/mkconstants.rb index 5aa00b9b2b..30cc90d47a 100644 --- a/ext/socket/mkconstants.rb +++ b/ext/socket/mkconstants.rb @@ -242,7 +242,7 @@ end def_name_to_int("family_to_int", /\A(AF_|PF_)/, "AF_") def_name_to_int("socktype_to_int", /\ASOCK_/, "SOCK_") def_name_to_int("ipproto_to_int", /\AIPPROTO_/, "IPPROTO_") -def_name_to_int("level_to_int", /\A(SOL_SOCKET\z|IPPROTO_)/, /\A(SOL_|IPPROTO_)/) +def_name_to_int("iplevel_to_int", /\A(SOL_SOCKET\z|IPPROTO_)/, /\A(SOL_|IPPROTO_)/) def_name_to_int("so_optname_to_int", /\ASO_/, "SO_") def_name_to_int("ip_optname_to_int", /\AIP_/, "IP_") def_name_to_int("ipv6_optname_to_int", /\AIPV6_/, "IPV6_", "IPPROTO_IPV6") @@ -255,7 +255,7 @@ def_intern('intern_family', /\AAF_/) def_intern('intern_protocol_family', /\APF_/) def_intern('intern_socktype', /\ASOCK_/) def_intern('intern_ipproto', /\AIPPROTO_/) -def_intern('intern_level', /\A(SOL_SOCKET\z|IPPROTO_)/, /\A(SOL_|IPPROTO_)/) +def_intern('intern_iplevel', /\A(SOL_SOCKET\z|IPPROTO_)/, /\A(SOL_|IPPROTO_)/) def_intern('intern_so_optname', /\ASO_/, "SO_") def_intern('intern_ip_optname', /\AIP_/, "IP_") def_intern('intern_ipv6_optname', /\AIPV6_/, "IPV6_") diff --git a/ext/socket/option.c b/ext/socket/option.c index e09cb79ae5..c0e28b7c3a 100644 --- a/ext/socket/option.c +++ b/ext/socket/option.c @@ -318,7 +318,7 @@ sockopt_inspect(VALUE self) rb_str_catf(ret, " optname:%d", optname); } else { - level_id = intern_level(level); + level_id = intern_iplevel(level); if (level_id) rb_str_catf(ret, " %s", rb_id2name(level_id)); else