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

ruby-changes:22351

From: nobu <ko1@a...>
Date: Tue, 31 Jan 2012 06:48:56 +0900 (JST)
Subject: [ruby-changes:22351] nobu:r34400 (trunk): * ext/dl/cptr.c (rb_dlptr_new2): remove unused variable.

nobu	2012-01-31 06:47:35 +0900 (Tue, 31 Jan 2012)

  New Revision: 34400

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

  Log:
    * ext/dl/cptr.c (rb_dlptr_new2): remove unused variable.
    
    * ext/iconv/iconv.c (get_iconv_opt_i): ditto.
    
    * ext/syck/token.c (Plain): fix types on LP64.

  Modified files:
    trunk/ext/dl/cptr.c
    trunk/ext/iconv/iconv.c
    trunk/ext/syck/token.c

Index: ext/dl/cptr.c
===================================================================
--- ext/dl/cptr.c	(revision 34399)
+++ ext/dl/cptr.c	(revision 34400)
@@ -63,15 +63,6 @@
     {dlptr_mark, dlptr_free, dlptr_memsize,},
 };
 
-void
-dlptr_init(VALUE val)
-{
-    struct ptr_data *data;
-
-    TypedData_Get_Struct(val, struct ptr_data, &dlptr_data_type, data);
-    OBJ_TAINT(val);
-}
-
 VALUE
 rb_dlptr_new2(VALUE klass, void *ptr, long size, freefunc_t func)
 {
@@ -83,7 +74,7 @@
     data->ptr = ptr;
     data->free = func;
     data->size = size;
-    dlptr_init(val);
+    OBJ_TAINT(val);
 
     return val;
 }
Index: ext/syck/token.c
===================================================================
--- ext/syck/token.c	(revision 34399)
+++ ext/syck/token.c	(revision 34400)
@@ -1489,8 +1489,8 @@
 
 Plain:
     {
-        int qidx = 0;
-        int qcapa = 100;
+        ptrdiff_t qidx = 0;
+        ptrdiff_t qcapa = 100;
         char *qstr = S_ALLOC_N( char, qcapa );
         SyckLevel *plvl;
         int parentIndent;
Index: ext/iconv/iconv.c
===================================================================
--- ext/iconv/iconv.c	(revision 34399)
+++ ext/iconv/iconv.c	(revision 34400)
@@ -563,13 +563,17 @@
 static VALUE
 get_iconv_opt_i(VALUE i, VALUE arg)
 {
+    VALUE name;
+#if defined ICONV_SET_TRANSLITERATE || defined ICONV_SET_DISCARD_ILSEQ
+    VALUE val;
     struct rb_iconv_opt_t *opt = (struct rb_iconv_opt_t *)arg;
-    VALUE name, val;
+#endif
 
-    (void)opt;
     i = rb_Array(i);
     name = rb_ary_entry(i, 0);
+#if defined ICONV_SET_TRANSLITERATE || defined ICONV_SET_DISCARD_ILSEQ
     val = rb_ary_entry(i, 1);
+#endif
     do {
 	if (SYMBOL_P(name)) {
 	    ID id = SYM2ID(name);

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

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