[前][次][番号順一覧][スレッド一覧][生データ]

yarv-dev:976

From: "U.Nakamura" <usa garbagecollect.jp>
Date: Fri, 24 Feb 2006 18:54:14 +0900
Subject: [yarv-dev:976] open> cannot compile with VC++

こんにちは、なかむら(う)です。

表題の通り、コンパイルが通りません。
基本的には添付のパッチの通りですが、たぶん単に

    yarv_control_frame_t *cfp = th_get_ruby_level_cfp(th, th->cfp);
    cref->nd_file = 0;

と入れ替えるだけでもいいのではないかと思います。

あと、ついでなので、parse.cのコンパイル時に出る不愉快な警告を
消すパッチも添付しておきます。

Index: vm.c
===================================================================
--- vm.c	(revision 475)
+++ vm.c	(working copy)
@@ -954,8 +954,9 @@
 th_cref_push(yarv_thread_t *th, VALUE klass, int noex)
 {
     NODE *cref = NEW_BLOCK(klass);
+    yarv_control_frame_t *cfp;
     cref->nd_file = 0;
-    yarv_control_frame_t *cfp = th_get_ruby_level_cfp(th, th->cfp);
+    cfp = th_get_ruby_level_cfp(th, th->cfp);
     cref->nd_next = get_cref(cfp->iseq, cfp->lfp);
     cref->nd_visi = noex;
     return cref;
Index: node.h
===================================================================
--- node.h	(revision 475)
+++ node.h	(working copy)
@@ -362,9 +362,9 @@
 VALUE rb_parser_new(void);
 VALUE rb_parser_end_seen_p(VALUE);
 
-NODE *rb_parser_compile_cstr(VALUE, const char*, const char*, int, int);
-NODE *rb_parser_compile_string(VALUE, const char*, VALUE, int);
-NODE *rb_parser_compile_file(VALUE, const char*, VALUE, int);
+NODE *rb_parser_compile_cstr(volatile VALUE, const char*, const char*, int, int);
+NODE *rb_parser_compile_string(volatile VALUE, const char*, VALUE, int);
+NODE *rb_parser_compile_file(volatile VALUE, const char*, VALUE, int);
 
 NODE *rb_compile_cstr(const char*, const char*, int, int);
 NODE *rb_compile_string(const char*, VALUE, int);

それでは。
-- 
U.Nakamura <usa garbagecollect.jp>



-- 
ML: yarv-dev quickml.atdot.net
使い方: http://www.atdot.net/~ko1/quickml

[前][次][番号順一覧][スレッド一覧][生データ]

->     976 2006-02-24 18:54 [usa garbagecollect.j] open> cannot compile with VC++          
       987 2006-02-27 22:01 ┗[ko1 atdot.net       ] fixed> Re: open> cannot compile with VC++
       996 2006-02-28 09:29  ┗[usa garbagecollect.j] cloes> Re: fixed> Re: open> cannot compile with VC++