yarv-diff:192
From: ko1 atdot.net
Date: 31 Dec 2005 18:52:14 -0000
Subject: [yarv-diff:192] r350 - trunk
Author: aamine
Date: 2006-01-01 03:52:14 +0900 (Sun, 01 Jan 2006)
New Revision: 350
Modified:
trunk/ChangeLog
trunk/debug.c
trunk/re.c
trunk/yarv.h
trunk/yarvcore.c
Log:
* yarvcore.c: add prototype.
* re.c: remove warning: long -> unsigned long.
* debug.c: adjust coding style.
* yarv.h: ditto.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2005-12-31 18:44:40 UTC (rev 349)
+++ trunk/ChangeLog 2005-12-31 18:52:14 UTC (rev 350)
@@ -4,6 +4,17 @@
# from Mon, 03 May 2004 01:24:19 +0900
#
+2006-01-01(Sun) 03:51:10 +0900 Minero Aoki <aamine loveruby.net>
+
+ * yarvcore.c: add prototype.
+
+ * re.c: remove warning: long -> unsigned long.
+
+ * debug.c: adjust coding style.
+
+ * yarv.h: ditto.
+
+
2006-01-01(Sun) 03:43:33 +0900 Minero Aoki <aamine loveruby.net>
* variable.c: add prototype.
Modified: trunk/debug.c
===================================================================
--- trunk/debug.c 2005-12-31 18:44:40 UTC (rev 349)
+++ trunk/debug.c 2005-12-31 18:52:14 UTC (rev 350)
@@ -3,9 +3,11 @@
* Create : K.S. 04/08/25 02:31:54
*/
-#include <ruby.h>
+#include "ruby.h"
-void debug_indent(int level, int debug_level, int indent_level){
+void
+debug_indent(int level, int debug_level, int indent_level)
+{
if(level < debug_level){
int i;
for(i=0 ;i<indent_level; i++){
@@ -15,7 +17,9 @@
}
}
-VALUE debug_value(int level, int debug_level, char *header, VALUE obj){
+VALUE
+debug_value(int level, int debug_level, char *header, VALUE obj)
+{
if(level < debug_level){
VALUE str;
str = rb_inspect(obj);
@@ -25,11 +29,15 @@
return obj;
}
-void debug_v(VALUE v){
+void
+debug_v(VALUE v)
+{
debug_value(0, 1, "", v);
}
-ID debug_id(int level, int debug_level, char *header, ID id){
+ID
+debug_id(int level, int debug_level, char *header, ID id)
+{
if(level < debug_level){
printf("DBG> %s: %s\n",header, rb_id2name(id));
fflush(stdout);
@@ -37,7 +45,9 @@
return id;
}
-void gc_check_func(){
+void
+gc_check_func(void)
+{
int i;
#define GCMKMAX 0x10
for(i=0;i<GCMKMAX;i++){
@@ -47,8 +57,7 @@
}
void
-debug_breakpoint()
+debug_breakpoint(void)
{
/* */
}
-
Modified: trunk/re.c
===================================================================
--- trunk/re.c 2005-12-31 18:44:40 UTC (rev 349)
+++ trunk/re.c 2005-12-31 18:52:14 UTC (rev 350)
@@ -105,7 +105,7 @@
int d;
unsigned long hx, hy;
-#define KR_REHASH(a, b, h) (((h) << 1) - ((long)(a)<<d) + (b))
+#define KR_REHASH(a, b, h) (((h) << 1) - (((unsigned long)(a))<<d) + (b))
if (m > n) return -1;
s = y; e = s + n - m;
Modified: trunk/yarv.h
===================================================================
--- trunk/yarv.h 2005-12-31 18:44:40 UTC (rev 349)
+++ trunk/yarv.h 2005-12-31 18:52:14 UTC (rev 350)
@@ -6,7 +6,7 @@
#define _YARV_H_INCLUDED_
-VALUE yarv_yield _((VALUE val));
+VALUE yarv_yield(VALUE val);
/* original API */
@@ -27,25 +27,25 @@
extern yarv_vm_t *theYarvVM;
static inline VALUE
-yarv_get_current_running_vm_value()
+yarv_get_current_running_vm_value(void)
{
return theYarvVM->self;
}
static inline VALUE
-yarv_get_current_running_thread_value()
+yarv_get_current_running_thread_value(void)
{
return yarvCurrentThread->self;
}
static inline yarv_vm_t *
-yarv_get_current_running_vm()
+yarv_get_current_running_vm(void)
{
return theYarvVM;
}
static inline yarv_thread_t *
-yarv_get_current_running_thread()
+yarv_get_current_running_thread(void)
{
return yarvCurrentThread;
}
@@ -75,8 +75,8 @@
int local_size;
};
-VALUE thread_yield_light_prepare _((VALUE self, int argc, VALUE *argv,
- struct yarv_yield_data *data));
+VALUE thread_yield_light_prepare(VALUE self, int argc, VALUE *argv,
+ struct yarv_yield_data *data);
VALUE th_invoke_yield(yarv_thread_t *th, int argc, VALUE *argv);
Modified: trunk/yarvcore.c
===================================================================
--- trunk/yarvcore.c 2005-12-31 18:44:40 UTC (rev 349)
+++ trunk/yarvcore.c 2005-12-31 18:52:14 UTC (rev 350)
@@ -737,6 +737,7 @@
VALUE th_eval_body(yarv_thread_t *th);
VALUE th_set_top_stack(yarv_thread_t *, VALUE iseq);
+VALUE rb_f_binding(VALUE);
static VALUE
th_eval(yarv_thread_t *th, VALUE iseq)
--
ML: yarv-diff quickml.atdot.net
Info: http://www.atdot.net/~ko1/quickml