diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-07-29 14:56:52 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-07-29 14:56:52 +0000 |
commit | f9368f65b108264889d54855e687334f7e84f092 (patch) | |
tree | b42c6ad1ddc40934761f4beeef5c4a8d1c41aa95 | |
parent | afde2e8d051c4bdfb62a5c31ad7c9425a4e5c4dc (diff) | |
download | ruby-f9368f65b108264889d54855e687334f7e84f092.tar.gz |
win32.c: rb_w32_inet_ntop should be const
* win32/win32.c (rb_w32_inet_ntop): type should be const.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | ext/socket/option.c | 2 | ||||
-rw-r--r-- | include/ruby/win32.h | 2 | ||||
-rw-r--r-- | win32/win32.c | 2 |
4 files changed, 7 insertions, 3 deletions
@@ -1,3 +1,7 @@ +Sun Jul 29 23:56:49 2012 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * win32/win32.c (rb_w32_inet_ntop): type should be const. + Sun Jul 29 14:20:34 2012 Kazuki Tsujimoto <kazuki@callcc.net> * thread.c (Init_Thread): does not need to set klass diff --git a/ext/socket/option.c b/ext/socket/option.c index 4cef1c81c4..37315629f2 100644 --- a/ext/socket/option.c +++ b/ext/socket/option.c @@ -437,7 +437,7 @@ inspect_timeval_as_interval(int level, int optname, VALUE data, VALUE ret) */ #ifndef HAVE_INET_NTOP -static char * +static const char * inet_ntop(int af, const void *addr, char *numaddr, size_t numaddr_len) { #ifdef HAVE_INET_NTOA diff --git a/include/ruby/win32.h b/include/ruby/win32.h index 7cbdb884df..718da1376c 100644 --- a/include/ruby/win32.h +++ b/include/ruby/win32.h @@ -266,7 +266,7 @@ extern int rb_w32_urename(const char *, const char *); extern char **rb_w32_get_environ(void); extern void rb_w32_free_environ(char **); extern int rb_w32_map_errno(DWORD); -extern char * WSAAPI rb_w32_inet_ntop(int,const void *,char *,size_t); +extern const char *WSAAPI rb_w32_inet_ntop(int,const void *,char *,size_t); extern DWORD rb_w32_osver(void); extern int chown(const char *, int, int); diff --git a/win32/win32.c b/win32/win32.c index 979b90e15c..458b613756 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -6532,7 +6532,7 @@ signbit(double x) #endif /* License: Ruby's */ -char * WSAAPI +const char * WSAAPI rb_w32_inet_ntop(int af, const void *addr, char *numaddr, size_t numaddr_len) { typedef char *(WSAAPI inet_ntop_t)(int, void *, char *, size_t); |