From 2b2c6911887d46be7cbfc8520e8cb5ed1843bc12 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 7 Sep 2015 07:50:11 +0000 Subject: vm_core.h: objspace always * vm_core.h (rb_vm_struct): define objspace always regardless ENABLE_VM_OBJSPACE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 10 ++++++++++ gc.c | 4 ---- vm.c | 4 ---- vm_core.h | 5 +---- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 55023b6dbb..571a8a8368 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Mon Sep 7 16:50:07 2015 Nobuyoshi Nakada + + * vm_core.h (rb_vm_struct): define objspace always regardless + ENABLE_VM_OBJSPACE. + +Mon Sep 7 16:49:30 2015 Nobuyoshi Nakada + + * vm_core.h (rb_vm_struct): define objspace always regardless + ENABLE_VM_OBJSPACE. + Mon Sep 7 15:54:58 2015 Nobuyoshi Nakada * ruby_atomic.h (ATOMIC_VALUE_CAS): fix typo. diff --git a/gc.c b/gc.c index 0f5e4cff43..9fc3549df4 100644 --- a/gc.c +++ b/gc.c @@ -184,9 +184,7 @@ static ruby_gc_params_t gc_params = { GC_OLDMALLOC_LIMIT_MIN, GC_OLDMALLOC_LIMIT_MAX, GC_OLDMALLOC_LIMIT_GROWTH_FACTOR, -#if defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE FALSE, -#endif }; /* GC_DEBUG: @@ -1267,9 +1265,7 @@ rb_objspace_alloc(void) return objspace; } -#endif -#if defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE static void free_stack_chunks(mark_stack_t *); static void heap_page_free(rb_objspace_t *objspace, struct heap_page *page); diff --git a/vm.c b/vm.c index 37eee294cc..951165694a 100644 --- a/vm.c +++ b/vm.c @@ -2784,10 +2784,6 @@ rb_vm_set_progname(VALUE filename) RB_OBJ_WRITE(cfp->iseq, &cfp->iseq->body->location.path, filename); } -#if defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE -struct rb_objspace *rb_objspace_alloc(void); -#endif - extern const struct st_hash_type rb_fstring_hash_type; void diff --git a/vm_core.h b/vm_core.h index cad0e09a58..2a427534a8 100644 --- a/vm_core.h +++ b/vm_core.h @@ -409,10 +409,9 @@ enum ruby_basic_operators { #define GetVMPtr(obj, ptr) \ GetCoreDataFromValue((obj), rb_vm_t, (ptr)) -#if defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE struct rb_objspace; +struct rb_objspace *rb_objspace_alloc(void); void rb_objspace_free(struct rb_objspace *); -#endif typedef struct rb_hook_list_struct { struct rb_event_hook_struct *hooks; @@ -476,9 +475,7 @@ typedef struct rb_vm_struct { VALUE defined_module_hash; -#if defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE struct rb_objspace *objspace; -#endif /* * @shyouhei notes that this is not for storing normal Ruby -- cgit v1.2.3