summaryrefslogtreecommitdiff
path: root/vm_core.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-18 07:29:17 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-18 07:29:17 +0000
commitd36c76dc71b47b201707185b8a0b4264e83de205 (patch)
treedf6b3edc1d6715dd11be75675f5ec55c54d3fa11 /vm_core.h
parent868684096079f3e786df517714fe6d795c4647b6 (diff)
* common.mk (eval.o): needs vm.h.
* eval.c (ruby_cleanup): destruct current VM before exit. * gc.c (rb_objspace_free): free object space. * vm.c (ruby_vm_destruct): destruct and free VM struct. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/vm_core.h b/vm_core.h
index 6c7624193a..6a5c31c922 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -31,6 +31,10 @@
#error "unsupported thread type"
#endif
+#ifndef ENABLE_VM_OBJSPACE
+#define ENABLE_VM_OBJSPACE 1
+#endif
+
#include <setjmp.h>
#include <signal.h>
@@ -239,6 +243,11 @@ enum ruby_special_exceptions {
#define GetVMPtr(obj, ptr) \
GetCoreDataFromValue(obj, rb_vm_t, ptr)
+#if defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE
+struct rb_objspace;
+void rb_objspace_free(struct rb_objspace *);
+#endif
+
typedef struct rb_vm_struct {
VALUE self;