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

ruby-changes:50147

From: k0kubun <ko1@a...>
Date: Wed, 7 Feb 2018 01:16:31 +0900 (JST)
Subject: [ruby-changes:50147] k0kubun:r62265 (trunk): mjit.c: prefix "_ruby" to precompiled header too

k0kubun	2018-02-07 01:16:25 +0900 (Wed, 07 Feb 2018)

  New Revision: 62265

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

  Log:
    mjit.c: prefix "_ruby" to precompiled header too
    
    for consistency and to clarify who created it.

  Modified files:
    trunk/mjit.c
Index: mjit.c
===================================================================
--- mjit.c	(revision 62264)
+++ mjit.c	(revision 62265)
@@ -683,6 +683,8 @@ load_func_from_so(const char *so_file, c https://github.com/ruby/ruby/blob/trunk/mjit.c#L683
     return func;
 }
 
+#define MJIT_TMP_PREFIX "_ruby_mjit_"
+
 /* Compile ISeq in UNIT and return function pointer of JIT-ed code.
    It may return NOT_COMPILABLE_JIT_ISEQ_FUNC if something went wrong. */
 static mjit_func_t
@@ -694,8 +696,8 @@ convert_unit_to_func(struct rb_mjit_unit https://github.com/ruby/ruby/blob/trunk/mjit.c#L696
     void *func;
     double start_time, end_time;
 
-    sprint_uniq_filename(c_file, unit->id, "_ruby_mjit", ".c");
-    sprint_uniq_filename(so_file, unit->id, "_ruby_mjit", ".so");
+    sprint_uniq_filename(c_file, unit->id, MJIT_TMP_PREFIX, ".c");
+    sprint_uniq_filename(so_file, unit->id, MJIT_TMP_PREFIX, ".so");
     sprintf(funcname, "_mjit%d", unit->id);
 
     f = fopen(c_file, "w");
@@ -1171,7 +1173,7 @@ mjit_init(struct mjit_options *opts) https://github.com/ruby/ruby/blob/trunk/mjit.c#L1173
     }
 
     init_header_filename();
-    pch_file = get_uniq_filename(0, "_mjit_h", ".h.gch");
+    pch_file = get_uniq_filename(0, MJIT_TMP_PREFIX "h", ".h.gch");
     if (header_file == NULL || pch_file == NULL) {
         mjit_init_p = FALSE;
         verbose(1, "Failure in MJIT header file name initialization\n");

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

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