summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--method.h6
-rw-r--r--vm_insnhelper.c2
-rw-r--r--vm_method.c3
4 files changed, 15 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 88e4cb215..6c0480363 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Wed Jul 22 22:16:48 2009 URABE Shyouhei <shyouhei@ruby-lang.org>
+
+ * method.h : Commas at end of enum list not allowed as of C89
+
+ * vm_method.c (rb_add_method): avoid C++ comment
+
+ * vm_insnhelper.c (vm_call_cfunc): ditto.
+
Wed Jul 22 20:42:52 2009 NAKAMURA Usaku <usa@ruby-lang.org>
* ext/socket/extconf.rb: define IPPROTO_IPV6 macro for recent Windows
diff --git a/method.h b/method.h
index 49eefade2..6032d572d 100644
--- a/method.h
+++ b/method.h
@@ -21,7 +21,7 @@ typedef enum {
NOEX_UNDEF = NOEX_NOSUPER,
NOEX_MODFUNC = 0x12,
NOEX_SUPER = 0x20,
- NOEX_VCALL = 0x40,
+ NOEX_VCALL = 0x40
} rb_method_flag_t;
#define NOEX_SAFE(n) ((int)((n) >> 8) & 0x0F)
@@ -39,7 +39,7 @@ typedef enum {
VM_METHOD_TYPE_ZSUPER,
VM_METHOD_TYPE_UNDEF,
VM_METHOD_TYPE_NOTIMPLEMENTED,
- VM_METHOD_TYPE_OPTIMIZED, /* Kernel#send, Proc#call, etc */
+ VM_METHOD_TYPE_OPTIMIZED /* Kernel#send, Proc#call, etc */
} rb_method_type_t;
typedef struct rb_method_cfunc_struct {
@@ -62,7 +62,7 @@ typedef struct rb_method_entry_struct {
VALUE proc;
enum method_optimized_type {
OPTIMIZED_METHOD_TYPE_SEND,
- OPTIMIZED_METHOD_TYPE_CALL,
+ OPTIMIZED_METHOD_TYPE_CALL
} optimize_type;
} body;
int alias_count;
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 0163db962..1eebf0521 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -367,7 +367,9 @@ vm_call_cfunc(rb_thread_t *th, rb_control_frame_t *reg_cfp,
EXEC_EVENT_HOOK(th, RUBY_EVENT_C_CALL, recv, id, klass);
TH_PUSH_TAG(th);
+#if defined(__cplusplus) || (__STDC_VERSION__ >= 199901L)
// TODO: fix me. separate event
+#endif
if (th->event_flags & RUBY_EVENT_C_RETURN) {
state = TH_EXEC_TAG();
}
diff --git a/vm_method.c b/vm_method.c
index 9ebeeb4a4..407b5b725 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -203,8 +203,9 @@ rb_add_method(VALUE klass, ID mid, rb_method_type_t type, void *opts, rb_method_
old_me->type != VM_METHOD_TYPE_UNDEF) {
rb_warning("method redefined; discarding old %s", rb_id2name(mid));
}
-
+#if defined(__cplusplus) || (__STDC_VERSION__ >= 199901L)
// TODO: free old_me
+#endif
}
/* check mid */