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

ruby-changes:31084

From: ko1 <ko1@a...>
Date: Mon, 7 Oct 2013 14:31:54 +0900 (JST)
Subject: [ruby-changes:31084] ko1:r43163 (trunk): * proc.c: catch up last commit.

ko1	2013-10-07 14:31:47 +0900 (Mon, 07 Oct 2013)

  New Revision: 43163

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

  Log:
    * proc.c: catch up last commit.
      Type of return value of rb_iseq_first_lineno() is now VALUE.
    * vm_insnhelper.c (argument_error): ditto.
    * vm_method.c (rb_method_entry_make): ditto.

  Modified files:
    trunk/ChangeLog
    trunk/proc.c
    trunk/vm_insnhelper.c
    trunk/vm_method.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 43162)
+++ ChangeLog	(revision 43163)
@@ -1,3 +1,12 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Oct  7 14:26:01 2013  Koichi Sasada  <ko1@a...>
+
+	* proc.c: catch up last commit.
+	  Type of return value of rb_iseq_first_lineno() is now VALUE.
+
+	* vm_insnhelper.c (argument_error): ditto.
+
+	* vm_method.c (rb_method_entry_make): ditto.
+
 Mon Oct  7 14:07:45 2013  Koichi Sasada  <ko1@a...>
 
 	* iseq.c, internal.h: change to public (but internal) functions
Index: proc.c
===================================================================
--- proc.c	(revision 43162)
+++ proc.c	(revision 43163)
@@ -924,7 +924,7 @@ iseq_location(rb_iseq_t *iseq) https://github.com/ruby/ruby/blob/trunk/proc.c#L924
     if (!iseq) return Qnil;
     loc[0] = iseq->location.path;
     if (iseq->line_info_table) {
-	loc[1] = INT2FIX(rb_iseq_first_lineno(iseq->self));
+	loc[1] = rb_iseq_first_lineno(iseq->self);
     }
     else {
 	loc[1] = Qnil;
@@ -1038,7 +1038,7 @@ proc_to_s(VALUE self) https://github.com/ruby/ruby/blob/trunk/proc.c#L1038
 	int first_lineno = 0;
 
 	if (iseq->line_info_table) {
-	    first_lineno = rb_iseq_first_lineno(iseq->self);
+	    first_lineno = FIX2INT(rb_iseq_first_lineno(iseq->self));
 	}
 	str = rb_sprintf("#<%s:%p@%"PRIsVALUE":%d%s>", cname, (void *)self,
 			 iseq->location.path, first_lineno, is_lambda);
@@ -2382,7 +2382,7 @@ proc_binding(VALUE self) https://github.com/ruby/ruby/blob/trunk/proc.c#L2382
     bind->env = proc->envval;
     if (RUBY_VM_NORMAL_ISEQ_P(proc->block.iseq)) {
 	bind->path = proc->block.iseq->location.path;
-	bind->first_lineno = rb_iseq_first_lineno(proc->block.iseq->self);
+	bind->first_lineno = FIX2INT(rb_iseq_first_lineno(proc->block.iseq->self));
     }
     else {
 	bind->path = Qnil;
Index: vm_method.c
===================================================================
--- vm_method.c	(revision 43162)
+++ vm_method.c	(revision 43163)
@@ -290,7 +290,7 @@ rb_method_entry_make(VALUE klass, ID mid https://github.com/ruby/ruby/blob/trunk/vm_method.c#L290
 		break;
 	    }
 	    if (iseq && !NIL_P(iseq->location.path)) {
-		int line = iseq->line_info_table ? rb_iseq_first_lineno(iseq->self) : 0;
+		int line = iseq->line_info_table ? FIX2INT(rb_iseq_first_lineno(iseq->self)) : 0;
 		rb_compile_warning(RSTRING_PTR(iseq->location.path), line,
 				   "previous definition of %s was here",
 				   rb_id2name(old_def->original_id));
Index: vm_insnhelper.c
===================================================================
--- vm_insnhelper.c	(revision 43162)
+++ vm_insnhelper.c	(revision 43163)
@@ -131,7 +131,7 @@ argument_error(const rb_iseq_t *iseq, in https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L131
     VALUE err_line = 0;
 
     if (iseq) {
-	int line_no = rb_iseq_first_lineno(iseq->self);
+	int line_no = FIX2INT(rb_iseq_first_lineno(iseq->self));
 
 	err_line = rb_sprintf("%s:%d:in `%s'",
 			      RSTRING_PTR(iseq->location.path),

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

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