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

ruby-changes:29678

From: nobu <ko1@a...>
Date: Mon, 1 Jul 2013 23:44:48 +0900 (JST)
Subject: [ruby-changes:29678] nobu:r41730 (trunk): util.c: constify

nobu	2013-07-01 23:44:31 +0900 (Mon, 01 Jul 2013)

  New Revision: 41730

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

  Log:
    util.c: constify
    
    * util.c (scan_digits): constify readonly table.

  Modified files:
    trunk/util.c

Index: util.c
===================================================================
--- util.c	(revision 41729)
+++ util.c	(revision 41730)
@@ -58,7 +58,7 @@ ruby_scan_hex(const char *start, size_t https://github.com/ruby/ruby/blob/trunk/util.c#L58
 static unsigned long
 scan_digits(const char *str, int base, size_t *retlen, int *overflow)
 {
-    static signed char table[] = {
+    static const signed char table[] = {
         /*     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
         /*0*/ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
         /*1*/ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,

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

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