From c6a24c45f8eb8f3e64dedaec492eaabfd5ec5ddc Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 21 May 2009 03:07:45 +0000 Subject: * include/ruby/ruby.h (RB_EVENT_HOOKS_HAVE_CALLBACK_DATA): new macro for compatibility check. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- README.EXT | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'README.EXT') diff --git a/README.EXT b/README.EXT index 7836545bbe..c28c259738 100644 --- a/README.EXT +++ b/README.EXT @@ -1234,7 +1234,7 @@ Specifies the name of the script ($0). ** Hooks for the Interpreter Events - void rb_add_event_hook(rb_event_hook_func_t func, rb_event_t events) + void rb_add_event_hook(rb_event_hook_func_t func, rb_event_flag_t events, VALUE data) Adds a hook function for the specified interpreter events. events should be Or'ed value of: @@ -1251,9 +1251,13 @@ events should be Or'ed value of: The definition of rb_event_hook_func_t is below: - typedef void (*rb_event_hook_func_t)(rb_event_t event, NODE *node, + typedef void (*rb_event_hook_func_t)(rb_event_t event, VALUE data, VALUE self, ID id, VALUE klass) +The third argument `data' to rb_add_event_hook() is passed to the hook +function as the second argument, which was the pointer to the current +NODE in 1.8. See RB_EVENT_HOOKS_HAVE_CALLBACK_DATA below. + int rb_remove_event_hook(rb_event_hook_func_t func) Removes the specified hook function. @@ -1293,6 +1297,11 @@ Defined in ruby.h and means correspoinding header is available. For instance, when HAVE_RUBY_ST_H is defined you should use ruby/st.h not mere st.h. + RB_EVENT_HOOKS_HAVE_CALLBACK_DATA + +Means that rb_add_event_hook() takes the third argument `data', to be +passed to the given event hook function. + Appendix C. Functions Available in extconf.rb These functions are available in extconf.rb: -- cgit v1.2.3