ruby-changes:66772
From: Sutou <ko1@a...>
Date: Tue, 13 Jul 2021 19:38:27 +0900 (JST)
Subject: [ruby-changes:66772] 9f86e50e1e (master): [ruby/fiddle] StringValuePtr may change the val
https://git.ruby-lang.org/ruby.git/commit/?id=9f86e50e1e From 9f86e50e1e03daff73a36fd8490f0457db98a641 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei <kou@c...> Date: Thu, 17 Jun 2021 13:40:11 +0900 Subject: [ruby/fiddle] StringValuePtr may change the val https://github.com/ruby/fiddle/commit/bddca7c895 --- ext/fiddle/pointer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/fiddle/pointer.c b/ext/fiddle/pointer.c index c5fb442..9336f04 100644 --- a/ext/fiddle/pointer.c +++ b/ext/fiddle/pointer.c @@ -770,6 +770,7 @@ rb_fiddle_ptr_s_to_ptr(VALUE self, VALUE val) https://github.com/ruby/ruby/blob/trunk/ext/fiddle/pointer.c#L770 } else if (RTEST(rb_obj_is_kind_of(val, rb_cString))){ char *str = StringValuePtr(val); + wrap = val; ptr = rb_fiddle_ptr_new(str, RSTRING_LEN(val), NULL); } else if ((vptr = rb_check_funcall(val, id_to_ptr, 0, 0)) != Qundef){ -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/