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

ruby-changes:51294

From: nobu <ko1@a...>
Date: Thu, 24 May 2018 15:15:48 +0900 (JST)
Subject: [ruby-changes:51294] nobu:r63500 (trunk): mjit.c: use remove_file in clean_so_file too

nobu	2018-05-24 15:15:43 +0900 (Thu, 24 May 2018)

  New Revision: 63500

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

  Log:
    mjit.c: use remove_file in clean_so_file too

  Modified files:
    trunk/mjit.c
Index: mjit.c
===================================================================
--- mjit.c	(revision 63499)
+++ mjit.c	(revision 63500)
@@ -216,6 +216,8 @@ VALUE rb_mMJIT; https://github.com/ruby/ruby/blob/trunk/mjit.c#L216
 static char *libruby_pathflag;
 #endif
 
+static void remove_file(const char *filename);
+
 /* Return time in milliseconds as a double.  */
 static double
 real_ms_time(void)
@@ -452,10 +454,7 @@ clean_so_file(struct rb_mjit_unit *unit) https://github.com/ruby/ruby/blob/trunk/mjit.c#L454
     char *so_file = unit->so_file;
     if (so_file) {
         unit->so_file = NULL;
-        if (remove(so_file)) {
-            fprintf(stderr, "failed to remove \"%s\": %s\n",
-                    so_file, strerror(errno));
-        }
+        remove_file(so_file);
         free(so_file);
     }
 #endif

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

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