path: root/node.h
diff options
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-03-22 08:35:23 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-03-22 08:35:23 +0000
commitc38fd2d127dd1169cecf5f46e3dc3b1cd8c5470a (patch)
tree1fb2f1f6e0990ed2d9c30cb11bc27db7d849cb32 /node.h
parent0bda9e89d11a8dbd36534987dbfae6aa32d326c5 (diff)
* eval.c (rb_add_event_hook): new function to add a hook function for
interpreter events. (backported form HEAD) git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'node.h')
1 files changed, 17 insertions, 0 deletions
diff --git a/node.h b/node.h
index 3f2416e..5059779 100644
--- a/node.h
+++ b/node.h
@@ -359,6 +359,23 @@ VALUE rb_gvar_get _((struct global_entry *));
VALUE rb_gvar_set _((struct global_entry *, VALUE));
VALUE rb_gvar_defined _((struct global_entry *));
+typedef unsigned int rb_event_t;
+#define RUBY_EVENT_NONE 0x00
+#define RUBY_EVENT_LINE 0x01
+#define RUBY_EVENT_CLASS 0x02
+#define RUBY_EVENT_END 0x04
+#define RUBY_EVENT_CALL 0x08
+#define RUBY_EVENT_RETURN 0x10
+#define RUBY_EVENT_C_CALL 0x20
+#define RUBY_EVENT_C_RETURN 0x40
+#define RUBY_EVENT_RAISE 0x80
+#define RUBY_EVENT_ALL 0xff
+typedef void (*rb_event_hook_func_t) _((rb_event_t,NODE*,VALUE,ID,VALUE));
+void rb_add_event_hook _((rb_event_hook_func_t,rb_event_t));
+int rb_remove_event_hook _((rb_event_hook_func_t));
#if defined(__cplusplus)
} /* extern "C" { */