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

ruby-changes:41011

From: nobu <ko1@a...>
Date: Sun, 13 Dec 2015 19:57:58 +0900 (JST)
Subject: [ruby-changes:41011] nobu:r53090 (trunk): function.c: fix typo

nobu	2015-12-13 19:57:51 +0900 (Sun, 13 Dec 2015)

  New Revision: 53090

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

  Log:
    function.c: fix typo
    
    * ext/fiddle/function.c (initialize): fix typo "ary" to "args",
      and adjust type of variables to suppress warnings.

  Modified files:
    trunk/ext/fiddle/function.c
Index: ext/fiddle/function.c
===================================================================
--- ext/fiddle/function.c	(revision 53089)
+++ ext/fiddle/function.c	(revision 53090)
@@ -94,7 +94,7 @@ initialize(int argc, VALUE argv[], VALUE https://github.com/ruby/ruby/blob/trunk/ext/fiddle/function.c#L94
     ffi_type **arg_types, *rtype;
     ffi_status result;
     VALUE ptr, args, ret_type, abi, kwds, ary;
-    long i, len;
+    int i, len;
     int nabi;
     void *cfunc;
 
@@ -110,8 +110,8 @@ initialize(int argc, VALUE argv[], VALUE https://github.com/ruby/ruby/blob/trunk/ext/fiddle/function.c#L110
 
     Check_Type(args, T_ARRAY);
     len = RARRAY_LENINT(args);
-    Check_Max_Args_Long("args", len);
-    ary = rb_ary_subseq(ary, 0, len);
+    Check_Max_Args("args", len);
+    ary = rb_ary_subseq(args, 0, len);
     for (i = 0; i < RARRAY_LEN(args); i++) {
 	VALUE a = RARRAY_PTR(args)[i];
 	int type = NUM2INT(a);

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

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