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

ruby-changes:59621

From: Kazuhiro <ko1@a...>
Date: Sun, 5 Jan 2020 12:27:29 +0900 (JST)
Subject: [ruby-changes:59621] c7af1e432a (master): Remove unused tmp_buffer in class.c

https://git.ruby-lang.org/ruby.git/commit/?id=c7af1e432a

From c7af1e432aed4c4586dd1e62b0431c14fa44289d Mon Sep 17 00:00:00 2001
From: Kazuhiro NISHIYAMA <zn@m...>
Date: Sun, 5 Jan 2020 12:25:24 +0900
Subject: Remove unused tmp_buffer in class.c

ref 44a164c26f5371519636585d8ba7aa59f489442e and beae6cbf0fd8b6619e5212552de98022d4c4d4d4

diff --git a/class.c b/class.c
index cda43de..66c149b 100644
--- a/class.c
+++ b/class.c
@@ -1960,7 +1960,6 @@ struct rb_scan_args_t { https://github.com/ruby/ruby/blob/trunk/class.c#L1960
     int argi;
     VALUE hash;
     VALUE last_hash;
-    VALUE *tmp_buffer;
 };
 
 static void
@@ -2105,16 +2104,11 @@ rb_scan_args(int argc, const VALUE *argv, const char *fmt, ...) https://github.com/ruby/ruby/blob/trunk/class.c#L2104
 {
     int error;
     va_list vargs;
-    VALUE tmp_buffer = 0;
     struct rb_scan_args_t arg;
-    arg.tmp_buffer = &tmp_buffer;
     rb_scan_args_parse(RB_SCAN_ARGS_PASS_CALLED_KEYWORDS, argc, argv, fmt, &arg);
     va_start(vargs,fmt);
     error = rb_scan_args_assign(&arg, vargs);
     va_end(vargs);
-    if (tmp_buffer) {
-        rb_free_tmp_buffer(&tmp_buffer);
-    }
     if (error) {
         rb_error_arity(arg.argc, arg.n_mand, arg.f_var ? UNLIMITED_ARGUMENTS : arg.n_mand + arg.n_opt);
     }
@@ -2126,16 +2120,11 @@ rb_scan_args_kw(int kw_flag, int argc, const VALUE *argv, const char *fmt, ...) https://github.com/ruby/ruby/blob/trunk/class.c#L2120
 {
     int error;
     va_list vargs;
-    VALUE tmp_buffer = 0;
     struct rb_scan_args_t arg;
-    arg.tmp_buffer = &tmp_buffer;
     rb_scan_args_parse(kw_flag, argc, argv, fmt, &arg);
     va_start(vargs,fmt);
     error = rb_scan_args_assign(&arg, vargs);
     va_end(vargs);
-    if (tmp_buffer) {
-        rb_free_tmp_buffer(&tmp_buffer);
-    }
     if (error) {
         rb_error_arity(arg.argc, arg.n_mand, arg.f_var ? UNLIMITED_ARGUMENTS : arg.n_mand + arg.n_opt);
     }
-- 
cgit v0.10.2


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

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