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

ruby-changes:4601

From: ko1@a...
Date: Sun, 20 Apr 2008 15:01:05 +0900 (JST)
Subject: [ruby-changes:4601] nobu - Ruby:r16095 (trunk): * compile.c (iseq_set_exception_table): allocates catch_table only

nobu	2008-04-20 15:00:51 +0900 (Sun, 20 Apr 2008)

  New Revision: 16095

  Modified files:
    trunk/ChangeLog
    trunk/compile.c

  Log:
    * compile.c (iseq_set_exception_table): allocates catch_table only
      when entries exist.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/compile.c?r1=16095&r2=16094&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=16095&r2=16094&diff_format=u

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 16094)
+++ ChangeLog	(revision 16095)
@@ -1,5 +1,8 @@
-Sun Apr 20 14:58:57 2008  Nobuyoshi Nakada  <nobu@r...>
+Sun Apr 20 15:00:48 2008  Nobuyoshi Nakada  <nobu@r...>
 
+	* compile.c (iseq_set_exception_table): allocates catch_table only
+	  when entries exist.
+
 	* compile.c (struct iseq_link_element, struct iseq_insn_data): made
 	  enum for debuggers.
 
Index: compile.c
===================================================================
--- compile.c	(revision 16094)
+++ compile.c	(revision 16095)
@@ -1290,7 +1290,7 @@
     tlen = RARRAY_LEN(iseq->compile_data->catch_table_ary);
     tptr = RARRAY_PTR(iseq->compile_data->catch_table_ary);
 
-    iseq->catch_table = ALLOC_N(struct iseq_catch_table_entry, tlen);
+    iseq->catch_table = tlen ? ALLOC_N(struct iseq_catch_table_entry, tlen) : 0;
     iseq->catch_table_size = tlen;
 
     for (i = 0; i < tlen; i++) {

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

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