ruby-changes:24515
From: nobu <ko1@a...>
Date: Sun, 29 Jul 2012 23:57:04 +0900 (JST)
Subject: [ruby-changes:24515] nobu:r36566 (trunk): win32.c: rb_w32_inet_ntop should be const
nobu 2012-07-29 23:56:52 +0900 (Sun, 29 Jul 2012) New Revision: 36566 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36566 Log: win32.c: rb_w32_inet_ntop should be const * win32/win32.c (rb_w32_inet_ntop): type should be const. Modified files: trunk/ChangeLog trunk/ext/socket/option.c trunk/include/ruby/win32.h trunk/win32/win32.c Index: include/ruby/win32.h =================================================================== --- include/ruby/win32.h (revision 36565) +++ include/ruby/win32.h (revision 36566) @@ -266,7 +266,7 @@ 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); Index: ChangeLog =================================================================== --- ChangeLog (revision 36565) +++ ChangeLog (revision 36566) @@ -1,3 +1,7 @@ +Sun Jul 29 23:56:49 2012 Nobuyoshi Nakada <nobu@r...> + + * win32/win32.c (rb_w32_inet_ntop): type should be const. + Sun Jul 29 14:20:34 2012 Kazuki Tsujimoto <kazuki@c...> * thread.c (Init_Thread): does not need to set klass Index: win32/win32.c =================================================================== --- win32/win32.c (revision 36565) +++ win32/win32.c (revision 36566) @@ -6532,7 +6532,7 @@ #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); Index: ext/socket/option.c =================================================================== --- ext/socket/option.c (revision 36565) +++ ext/socket/option.c (revision 36566) @@ -437,7 +437,7 @@ */ #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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/