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

ruby-changes:12141

From: nobu <ko1@a...>
Date: Mon, 22 Jun 2009 16:05:58 +0900 (JST)
Subject: [ruby-changes:12141] Ruby:r23814 (trunk): * compile.c: fixed types.

nobu	2009-06-22 16:05:50 +0900 (Mon, 22 Jun 2009)

  New Revision: 23814

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

  Log:
    * compile.c: fixed types.

  Modified files:
    trunk/compile.c

Index: compile.c
===================================================================
--- compile.c	(revision 23813)
+++ compile.c	(revision 23814)
@@ -520,7 +520,7 @@
     MEMCPY(iseq->iseq_encoded, iseq->iseq, VALUE, iseq->iseq_size);
 
     for (i = 0; i < iseq->iseq_size; /* */ ) {
-	int insn = iseq->iseq_encoded[i];
+	int insn = (int)iseq->iseq_encoded[i];
 	int len = insn_len(insn);
 	iseq->iseq_encoded[i] = (VALUE)table[insn];
 	i += len;
@@ -1066,7 +1066,7 @@
 	 *  if "r" is 1, it's means "{|x,|}" type block parameter.
 	 */
 
-	iseq->argc = node_args->nd_frml;
+	iseq->argc = (int)node_args->nd_frml;
 	debugs("  - argc: %d\n", iseq->argc);
 
 	if (node_aux) {
@@ -1081,7 +1081,7 @@
 	    if (node_aux) {
 		ID post_start_id = node_aux->nd_pid;
 		iseq->arg_post_start = get_dyna_var_idx_at_raw(iseq, post_start_id);
-		iseq->arg_post_len = node_aux->nd_plen;
+		iseq->arg_post_len = (int)node_aux->nd_plen;
 		node_init = node_aux->nd_next;
 	    }
 	}
@@ -1191,7 +1191,7 @@
     int size;
 
     if (tbl) {
-	size = *tbl;
+	size = (int)*tbl;
 	tbl++;
     }
     else {
@@ -1544,7 +1544,7 @@
     int tlen, i;
     struct iseq_catch_table_entry *entry;
 
-    tlen = RARRAY_LEN(iseq->compile_data->catch_table_ary);
+    tlen = (int)RARRAY_LEN(iseq->compile_data->catch_table_ary);
     tptr = RARRAY_PTR(iseq->compile_data->catch_table_ary);
 
     iseq->catch_table = tlen ? ALLOC_N(struct iseq_catch_table_entry, tlen) : 0;
@@ -2237,7 +2237,7 @@
 	       VALUE opt_p, int poped)
 {
     NODE *node = node_root;
-    int len = node->nd_alen, line = nd_line(node), i=0;
+    int len = (int)node->nd_alen, line = (int)nd_line(node), i=0;
     DECL_ANCHOR(anchor);
 
     INIT_ANCHOR(anchor);
@@ -2488,7 +2488,7 @@
 		/*a, b, *r, p1, p2 */
 		NODE *postn = splatn->nd_2nd;
 		NODE *restn = splatn->nd_1st;
-		int num = postn->nd_alen;
+		int num = (int)postn->nd_alen;
 		int flag = 0x02 | (((VALUE)restn == (VALUE)-1) ? 0x00 : 0x01);
 
 		ADD_INSN2(ret, nd_line(splatn), expandarray,
@@ -2954,7 +2954,7 @@
 	return COMPILE_OK;
     }
 
-    iseq->compile_data->last_line = nd_line(node);
+    iseq->compile_data->last_line = (int)nd_line(node);
     debug_node_start(node);
 
     type = nd_type(node);

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

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