From 7a31280ea3978bf8d7f05fe58c6e96cb4431f9df Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 25 Jul 2012 23:38:37 +0100 Subject: ruby: In event wrapper, ignore callback functions which have type T_ZOMBIE. Note that in old versions of Ruby, T_ZOMBIE was not defined. (cherry picked from commit 5f30912d74a553399d2bda055560d4340a15088d) --- generator/generator_ruby.ml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/generator/generator_ruby.ml b/generator/generator_ruby.ml index 742a0cc4..bf133608 100644 --- a/generator/generator_ruby.ml +++ b/generator/generator_ruby.ml @@ -276,9 +276,14 @@ ruby_event_callback_wrapper_wrapper (VALUE argvv) /* Check the Ruby callback still exists. For reasons which are not * fully understood, even though we registered this as a global root, * it is still possible for the callback to go away (fn value remains - * but its type changes from T_DATA to T_NONE). (RHBZ#733297) + * but its type changes from T_DATA to T_NONE or T_ZOMBIE). + * (RHBZ#733297, RHBZ#843188) */ - if (rb_type (fn) != T_NONE) { + if (rb_type (fn) != T_NONE +#ifdef T_ZOMBIE + && rb_type (fn) != T_ZOMBIE +#endif + ) { eventv = argv[1]; event_handlev = argv[2]; bufv = argv[3]; -- cgit