[前][次][番号順一覧][スレッド一覧]

ruby-changes:39884

From: nobu <ko1@a...>
Date: Tue, 29 Sep 2015 01:11:56 +0900 (JST)
Subject: [ruby-changes:39884] nobu:r51965 (trunk): vsnprintf.c: constify

nobu	2015-09-29 01:11:41 +0900 (Tue, 29 Sep 2015)

  New Revision: 51965

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51965

  Log:
    vsnprintf.c: constify
    
    * vsnprintf.c (FILE::vextra): constify the return value.

  Modified files:
    trunk/sprintf.c
    trunk/vsnprintf.c
Index: vsnprintf.c
===================================================================
--- vsnprintf.c	(revision 51964)
+++ vsnprintf.c	(revision 51965)
@@ -177,7 +177,7 @@ typedef	struct __sFILE { https://github.com/ruby/ruby/blob/trunk/vsnprintf.c#L177
 	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;
 
 
Index: sprintf.c
===================================================================
--- sprintf.c	(revision 51964)
+++ sprintf.c	(revision 51965)
@@ -1325,7 +1325,7 @@ ruby__sfvwrite(register rb_printf_buffer https://github.com/ruby/ruby/blob/trunk/sprintf.c#L1325
     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;

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]