Skip to content

Commit

Permalink
* method.h : Commas at end of enum list not allowed as of C89
Browse files Browse the repository at this point in the history
	* 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
  • Loading branch information
shyouhei committed Jul 22, 2009
1 parent 9d43aef commit 506a982
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions method.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 {
Expand All @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions vm_insnhelper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
3 changes: 2 additions & 1 deletion vm_method.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 506a982

Please sign in to comment.