diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-03-16 13:05:46 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-03-16 13:05:46 +0000 |
commit | 1aeb9b93c2446b07eb20b9ac4518014b1276911a (patch) | |
tree | 52acd4c4c2dcb24f430bdbce33e04f5e403e05be /node.h | |
parent | feda16cbd48c1c60b304218e41985cd378382190 (diff) | |
download | ruby-1aeb9b93c2446b07eb20b9ac4518014b1276911a.tar.gz |
* eval.c (rb_add_event_hook): new function to add a hook function for
interpreter events.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'node.h')
-rw-r--r-- | node.h | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -365,6 +365,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" { */ #endif |