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

ruby-changes:38726

From: nobu <ko1@a...>
Date: Tue, 9 Jun 2015 16:25:48 +0900 (JST)
Subject: [ruby-changes:38726] nobu:r50807 (trunk): version.c: use str_new_static

nobu	2015-06-09 16:25:44 +0900 (Tue, 09 Jun 2015)

  New Revision: 50807

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

  Log:
    version.c: use str_new_static
    
    * version.c (MKSTR): always make from static strings for sizeof
      operator.

  Modified files:
    trunk/version.c
Index: version.c
===================================================================
--- version.c	(revision 50806)
+++ version.c	(revision 50807)
@@ -18,7 +18,7 @@ https://github.com/ruby/ruby/blob/trunk/version.c#L18
 #endif
 
 #define PRINT(type) puts(ruby_##type)
-#define MKSTR(type) rb_obj_freeze(rb_usascii_str_new(ruby_##type, sizeof(ruby_##type)-1))
+#define MKSTR(type) rb_obj_freeze(rb_usascii_str_new_static(ruby_##type, sizeof(ruby_##type)-1))
 
 const int ruby_api_version[] = {
     RUBY_API_VERSION_MAJOR,

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

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