* 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.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
shyouhei 2009-07-22 13:27:26 +00:00
Родитель 9d43aefe92
Коммит 506a9821ce
4 изменённых файлов: 15 добавлений и 4 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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;

Просмотреть файл

@ -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();
}

Просмотреть файл

@ -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 */