* 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
This commit is contained in:
shugo 2005-03-16 13:05:46 +00:00
parent feda16cbd4
commit 1aeb9b93c2
5 changed files with 192 additions and 35 deletions

17
node.h
View file

@ -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