From 8007168bafb6dd6b7fd7143118885aed4a67059d Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 28 Sep 2015 16:11:41 +0000 Subject: [PATCH] vsnprintf.c: constify * vsnprintf.c (FILE::vextra): constify the return value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- sprintf.c | 2 +- vsnprintf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sprintf.c b/sprintf.c index afe27c2d63..705d3cece5 100644 --- a/sprintf.c +++ b/sprintf.c @@ -1325,7 +1325,7 @@ ruby__sfvwrite(register rb_printf_buffer *fp, register struct __suio *uio) return 0; } -static char * +static const char * ruby__sfvextra(rb_printf_buffer *fp, size_t valsize, void *valp, long *sz, int sign) { VALUE value, result = (VALUE)fp->_bf._base; diff --git a/vsnprintf.c b/vsnprintf.c index 49431d1640..21ba8b0768 100644 --- a/vsnprintf.c +++ b/vsnprintf.c @@ -177,7 +177,7 @@ typedef struct __sFILE { struct __sbuf _bf; /* the buffer (at least 1 byte, if !NULL) */ size_t _lbfsize; /* 0 or -_bf._size, for inline putc */ int (*vwrite)(/* struct __sFILE*, struct __suio * */); - char *(*vextra)(/* struct __sFILE*, size_t, void*, long*, int */); + const char *(*vextra)(/* struct __sFILE*, size_t, void*, long*, int */); } FILE;