diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-09-05 13:07:06 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-09-05 13:07:06 +0000 |
commit | 43c98dad10a8bbbd11b32177c0922441bf9350b0 (patch) | |
tree | afde08d28d3b624a60ef5091747f25851d20e04e /ext/tk/tcltklib.c | |
parent | 9e0cd0c4525231d48afe8e0b3bea698921efe7b8 (diff) | |
download | ruby-43c98dad10a8bbbd11b32177c0922441bf9350b0.tar.gz ruby-43c98dad10a8bbbd11b32177c0922441bf9350b0.tar.xz ruby-43c98dad10a8bbbd11b32177c0922441bf9350b0.zip |
* ext/tk/tcltklib.c: use rb_ary_new3() since RARRAY_LEN() is not l-value.
* ext/tk/tkutil/tkutil.c: use RARRAY_PTR() and RARRAY_LEN() and etc.
fixed: [ruby-dev:29473]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/tcltklib.c')
-rw-r--r-- | ext/tk/tcltklib.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/ext/tk/tcltklib.c b/ext/tk/tcltklib.c index 9086f3e4a..45f6a82e6 100644 --- a/ext/tk/tcltklib.c +++ b/ext/tk/tcltklib.c @@ -5584,9 +5584,7 @@ tk_funcall(func, argc, argv, obj) Tcl_Preserve(callq); /* allocate result obj */ - result = rb_ary_new2(1); - RARRAY_PTR(result)[0] = Qnil; - RARRAY_LEN(result) = 1; + result = rb_ary_new3(1, Qnil); /* construct event data */ callq->done = alloc_done; @@ -5899,9 +5897,7 @@ ip_eval(self, str) Tcl_Preserve(evq); /* allocate result obj */ - result = rb_ary_new2(1); - RARRAY_PTR(result)[0] = Qnil; - RARRAY_LEN(result) = 1; + result = rb_ary_new3(1, Qnil); /* construct event data */ evq->done = alloc_done; @@ -6979,9 +6975,7 @@ ip_invoke_with_position(argc, argv, obj, position) Tcl_Preserve(ivq); /* allocate result obj */ - result = rb_ary_new2(1); - RARRAY_PTR(result)[0] = Qnil; - RARRAY_LEN(result) = 1; + result = rb_ary_new3(1, Qnil); /* construct event data */ ivq->done = alloc_done; |