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

ruby-changes:9044

From: yugui <ko1@a...>
Date: Mon, 8 Dec 2008 23:42:03 +0900 (JST)
Subject: [ruby-changes:9044] Ruby:r20581 (ruby_1_8, trunk): * pack.c (pack_pack): fixed odd act of 'm*', 'M*', and 'P*'.

yugui	2008-12-08 23:41:44 +0900 (Mon, 08 Dec 2008)

  New Revision: 20581

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

  Log:
    * pack.c (pack_pack): fixed odd act of 'm*', 'M*', and 'P*'.
      just ignores '*' in these cases.
      [ruby-dev:37289]

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/pack.c
    trunk/ChangeLog
    trunk/pack.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 20580)
+++ ChangeLog	(revision 20581)
@@ -1,3 +1,9 @@
+Mon Dec  8 23:34:18 2008  Yuki Sonoda (Yugui)  <yugui@y...>
+
+	* pack.c (pack_pack): fixed odd act of 'm*', 'M*', and 'P*'.
+	  just ignores '*' in these cases.
+	  [ruby-dev:37289]
+
 Mon Dec  8 18:31:41 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* pack.c (pack_pack): fixed length for odd length string.
Index: pack.c
===================================================================
--- pack.c	(revision 20580)
+++ pack.c	(revision 20581)
@@ -491,7 +491,9 @@
 	    }
 	}
 	if (*p == '*') {	/* set data length */
-	    len = strchr("@Xxu", type) ? 0 : items;
+	    len = strchr("@Xxu", type) ? 0
+                : strchr("PMm", type) ? 1
+                : items;
 	    p++;
 	}
 	else if (ISDIGIT(*p)) {
Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 20580)
+++ ruby_1_8/ChangeLog	(revision 20581)
@@ -1,3 +1,9 @@
+Mon Dec  8 23:34:18 2008  Yuki Sonoda (Yugui)  <yugui@y...>
+
+	* pack.c (pack_pack): fixed odd act of 'm*', 'M*', and 'P*'.
+	  just ignores '*' in these cases.
+	  [ruby-dev:37289]
+
 Mon Dec  8 18:31:41 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* pack.c (pack_pack): fixed length for odd length string.
Index: ruby_1_8/pack.c
===================================================================
--- ruby_1_8/pack.c	(revision 20580)
+++ ruby_1_8/pack.c	(revision 20581)
@@ -493,7 +493,9 @@
 	    }
 	}
 	if (*p == '*') {	/* set data length */
-	    len = strchr("@Xxu", type) ? 0 : items;
+	    len = strchr("@Xxu", type) ? 0
+                : strchr("PMm", type) ? 1
+                : items;
 	    p++;
 	}
 	else if (ISDIGIT(*p)) {

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

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