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

ruby-changes:6771

From: nobu <ko1@a...>
Date: Thu, 31 Jul 2008 11:35:11 +0900 (JST)
Subject: [ruby-changes:6771] Ruby:r18287 (mvm): * merged from trunk r18280:18286.

nobu	2008-07-31 11:34:50 +0900 (Thu, 31 Jul 2008)

  New Revision: 18287

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

  Log:
    * merged from trunk r18280:18286.

  Modified files:
    branches/mvm/.merged-trunk-revision
    branches/mvm/ChangeLog
    branches/mvm/dir.c
    branches/mvm/ext/openssl/ossl_asn1.c
    branches/mvm/ext/syck/rubyext.c
    branches/mvm/ext/syck/syck.c
    branches/mvm/ext/syck/syck.h
    branches/mvm/pack.c

Index: mvm/ChangeLog
===================================================================
--- mvm/ChangeLog	(revision 18286)
+++ mvm/ChangeLog	(revision 18287)
@@ -1,3 +1,26 @@
+Thu Jul 31 11:31:29 2008  Nobuyoshi Nakada  <nobu@r...>
+
+	* ext/syck/syck.h (ASSERT): fix typo at r18176.
+
+	* ext/syck/rubyext.c (rb_syck_compile): expression in ASSERT() has no
+	  effect unless debug mode.
+
+Thu Jul 31 10:51:39 2008  Nobuyoshi Nakada  <nobu@r...>
+
+	* iseq.c (ruby_iseq_disasm_insn): suppress warnings on platforms which
+	  int size differs from pointer size.
+
+	* ext/openssl/ossl_asn1.c (ossl_asn1_get_asn1type): ditto
+
+	* ext/syck/rubyext.c (rb_syck_err_handler),
+	  (syck_default_error_handler): ditto.
+
+Thu Jul 31 02:21:39 2008  Yusuke Endoh  <mame@t...>
+
+	* ext/syck/rubyext.c (rb_syck_compile): remove meaningless branch
+	  that misleads into thinking that the variable sav may be
+	  uninitialized.
+
 Thu Jul 31 01:36:02 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* file.c (rb_file_s_join, Init_File): moved separator to VM.
Index: mvm/pack.c
===================================================================
--- mvm/pack.c	(revision 18286)
+++ mvm/pack.c	(revision 18287)
@@ -1303,7 +1303,7 @@
 static VALUE
 pack_unpack(VALUE str, VALUE fmt)
 {
-    static const char *hexdigits = "0123456789abcdef0123456789ABCDEFx";
+    static const char hexdigits[] = "0123456789abcdef0123456789ABCDEFx";
     char *s, *send;
     char *p, *pend;
     VALUE ary;
Index: mvm/dir.c
===================================================================
--- mvm/dir.c	(revision 18286)
+++ mvm/dir.c	(revision 18287)
@@ -1966,7 +1966,7 @@
 #if USE_OPENAT
     base = dirfd(dp->dir);
 #else
-    basepath = rb_str_new2(dp->path);
+    basepath = dp->path;
 #ifdef AT_FDCWD
     base = AT_FDCWD;
 #else
@@ -2256,7 +2256,7 @@
 	rb_sys_fail(fullpath);
     }
 #else
-    fullpath = to_fullpath(&path, rb_str_new2(dp->path));
+    fullpath = to_fullpath(&path, dp->path);
     if (mkdir(fullpath, mode) == -1) {
 	rb_sys_fail(fullpath);
     }
@@ -2280,7 +2280,7 @@
 	rb_sys_fail(fullpath);
     }
 #else
-    fullpath = to_fullpath(&path, rb_str_new2(dp->path));
+    fullpath = to_fullpath(&path, dp->path);
     if (unlink(fullpath) == -1) {
 	rb_sys_fail(fullpath);
     }
@@ -2303,7 +2303,7 @@
 #if USE_OPENAT
     if (fchdir(dirfd(dp->dir))) rb_sys_fail(0);
 #else
-    path = rb_file_expand_path(path, rb_str_new2(dp->path));
+    path = rb_file_expand_path(path, dp->path);
 #endif
     if (chdir(RSTRING_PTR(path))) rb_sys_fail(0);
 
@@ -2325,7 +2325,7 @@
 	rb_sys_fail(fullpath);
     }
 #else
-    fullpath = to_fullpath(&path, rb_str_new2(dp->path));
+    fullpath = to_fullpath(&path, dp->path);
     if (rmdir(fullpath) == -1) {
 	rb_sys_fail(fullpath);
     }
Index: mvm/ext/openssl/ossl_asn1.c
===================================================================
--- mvm/ext/openssl/ossl_asn1.c	(revision 18286)
+++ mvm/ext/openssl/ossl_asn1.c	(revision 18287)
@@ -495,7 +495,7 @@
     value = ossl_asn1_get_value(obj);
     switch(tag){
     case V_ASN1_BOOLEAN:
-	ptr = (void*)obj_to_asn1bool(value);
+	ptr = (void*)(VALUE)obj_to_asn1bool(value);
 	free_func = NULL;
 	break;
     case V_ASN1_INTEGER:         /* FALLTHROUGH */
Index: mvm/ext/syck/rubyext.c
===================================================================
--- mvm/ext/syck/rubyext.c	(revision 18286)
+++ mvm/ext/syck/rubyext.c	(revision 18287)
@@ -104,7 +104,7 @@
     char *ret;
     VALUE bc;
     bytestring_t *sav = NULL;
-    void *data;
+    void *data = NULL;
 
     SyckParser *parser = syck_new_parser();
     taint = syck_parser_assign_io(parser, &port);
@@ -113,7 +113,10 @@
     syck_parser_implicit_typing( parser, 0 );
     syck_parser_taguri_expansion( parser, 0 );
     oid = syck_parse( parser );
-    if (syck_lookup_sym( parser, oid, &data )) sav = data;
+    if (!syck_lookup_sym( parser, oid, &data )) {
+	rb_raise(rb_eSyntaxError, "root node <%lx> not found", oid);
+    }
+    sav = data;
 
     ret = S_ALLOCA_N( char, strlen( sav->buffer ) + 3 );
     ret[0] = '\0';
@@ -643,7 +646,7 @@
         endl++;
 
     endl[0] = '\0';
-    rb_raise(rb_eArgError, "%s on line %d, col %d: `%s'",
+    rb_raise(rb_eArgError, "%s on line %d, col %"PRIdPTRDIFF": `%s'",
            msg,
            p->linect,
            p->cursor - p->lineptr, 
Index: mvm/ext/syck/syck.c
===================================================================
--- mvm/ext/syck/syck.c	(revision 18286)
+++ mvm/ext/syck/syck.c	(revision 18287)
@@ -499,7 +499,7 @@
 void
 syck_default_error_handler( SyckParser *p, const char *msg )
 {
-    printf( "Error at [Line %d, Col %d]: %s\n", 
+    printf( "Error at [Line %d, Col %"PRIdPTRDIFF"]: %s\n", 
         p->linect,
         p->cursor - p->lineptr,
         msg );
Index: mvm/ext/syck/syck.h
===================================================================
--- mvm/ext/syck/syck.h	(revision 18286)
+++ mvm/ext/syck/syck.h	(revision 18287)
@@ -34,7 +34,7 @@
 #if DEBUG
 void syck_assert( const char *, unsigned, const char * );
 # define ASSERT(f) \
-    (( f ) ? (void)0 syck_assert( __FILE__, __LINE__, #f )
+    (( f ) ? (void)0 : syck_assert( __FILE__, __LINE__, #f ))
 #else
 # define ASSERT(f) ((void)0)
 #endif
Index: mvm/.merged-trunk-revision
===================================================================
--- mvm/.merged-trunk-revision	(revision 18286)
+++ mvm/.merged-trunk-revision	(revision 18287)
@@ -1 +1 @@
-18280
+18286

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

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