Skip to content
Browse files

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
  • Loading branch information...
1 parent afde2e8 commit f9368f65b108264889d54855e687334f7e84f092 @nobu nobu committed
Showing with 7 additions and 3 deletions.
  1. +4 −0 ChangeLog
  2. +1 −1 ext/socket/option.c
  3. +1 −1 include/ruby/win32.h
  4. +1 −1 win32/win32.c
View
4 ChangeLog
@@ -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
View
2 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
View
2 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);
View
2 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);

0 comments on commit f9368f6

Please sign in to comment.
Something went wrong with that request. Please try again.