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

ruby-changes:39688

From: nobu <ko1@a...>
Date: Sat, 5 Sep 2015 23:00:29 +0900 (JST)
Subject: [ruby-changes:39688] nobu:r51769 (trunk): internal.h: move rb_readlink declaration

nobu	2015-09-05 23:00:15 +0900 (Sat, 05 Sep 2015)

  New Revision: 51769

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

  Log:
    internal.h: move rb_readlink declaration
    
    * internal.h (rb_readlink): move the declaration.
    
    * ruby.c (dladdr_path): rb_readlink now requires the result
      encoding.

  Modified files:
    trunk/file.c
    trunk/internal.h
    trunk/ruby.c
Index: internal.h
===================================================================
--- internal.h	(revision 51768)
+++ internal.h	(revision 51769)
@@ -1266,6 +1266,9 @@ VALUE rb_str2big_gmp(VALUE arg, int base https://github.com/ruby/ruby/blob/trunk/internal.h#L1266
 int rb_bug_reporter_add(void (*func)(FILE *, void *), void *data);
 
 /* file.c (export) */
+#ifdef HAVE_READLINK
+VALUE rb_readlink(VALUE path, rb_encoding *enc);
+#endif
 #ifdef __APPLE__
 VALUE rb_str_normalize_ospath(const char *ptr, long len);
 #endif
Index: ruby.c
===================================================================
--- ruby.c	(revision 51768)
+++ ruby.c	(revision 51769)
@@ -382,9 +382,8 @@ dladdr_path(const void* addr) https://github.com/ruby/ruby/blob/trunk/ruby.c#L382
     }
 #ifdef __linux__
     else if (dli.dli_fname == origarg.argv[0]) {
-	VALUE rb_readlink(VALUE);
 	fname = rb_str_new_cstr("/proc/self/exe");
-	path = rb_readlink(fname);
+	path = rb_readlink(fname, NULL);
     }
 #endif
     else {
Index: file.c
===================================================================
--- file.c	(revision 51768)
+++ file.c	(revision 51769)
@@ -2786,8 +2786,6 @@ rb_file_s_symlink(VALUE klass, VALUE fro https://github.com/ruby/ruby/blob/trunk/file.c#L2786
 #endif
 
 #ifdef HAVE_READLINK
-VALUE rb_readlink(VALUE path, rb_encoding *enc);
-
 /*
  *  call-seq:
  *     File.readlink(link_name)  ->  file_name

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

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