vm.c: prototype
* vm.c (rb_next_class_sequence): use ANSI style definition and prorotype declaration, instead of old-K&R style. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
71f3943558
commit
eeb39e0152
3
class.c
3
class.c
@ -241,7 +241,8 @@ rewrite_cref_stack(NODE *node, VALUE old_klass, VALUE new_klass)
|
||||
if (node->nd_clss == old_klass) {
|
||||
new_node = NEW_CREF(new_klass);
|
||||
new_node->nd_next = node->nd_next;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
new_node = NEW_CREF(node->nd_clss);
|
||||
new_node->nd_next = rewrite_cref_stack(node->nd_next, old_klass, new_klass);
|
||||
}
|
||||
|
3
gc.c
3
gc.c
@ -1255,7 +1255,8 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
|
||||
if (RCLASS_EXT(obj)->subclasses) {
|
||||
if (BUILTIN_TYPE(obj) == T_MODULE) {
|
||||
rb_class_detach_module_subclasses(obj);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
rb_class_detach_subclasses(obj);
|
||||
}
|
||||
RCLASS_EXT(obj)->subclasses = NULL;
|
||||
|
@ -635,7 +635,7 @@ void ruby_kill(rb_pid_t pid, int sig);
|
||||
void Init_native_thread(void);
|
||||
|
||||
/* vm_insnhelper.h */
|
||||
vm_state_version_t rb_next_class_sequence();
|
||||
vm_state_version_t rb_next_class_sequence(void);
|
||||
|
||||
/* vm.c */
|
||||
VALUE rb_obj_is_thread(VALUE obj);
|
||||
|
2
vm.c
2
vm.c
@ -88,7 +88,7 @@ static vm_state_version_t ruby_vm_sequence = 1;
|
||||
#define PROCDEBUG 0
|
||||
|
||||
vm_state_version_t
|
||||
rb_next_class_sequence()
|
||||
rb_next_class_sequence(void)
|
||||
{
|
||||
return NEXT_CLASS_SEQUENCE();
|
||||
}
|
||||
|
@ -42,7 +42,8 @@ rb_clear_cache_by_class(VALUE klass)
|
||||
if (klass && klass != Qundef) {
|
||||
if (klass == rb_cBasicObject || klass == rb_cObject || klass == rb_mKernel) {
|
||||
INC_VM_STATE_VERSION();
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
rb_class_clear_method_cache(klass);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user