diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-07-25 23:38:37 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-07-26 11:56:49 +0100 |
commit | 5f30912d74a553399d2bda055560d4340a15088d (patch) | |
tree | dba1f5b142ff481d832314d8dfd64e0b475c86c3 | |
parent | 7b84b496031fb207cb00c8f314aeb06544a1d7b5 (diff) | |
download | libguestfs-5f30912d74a553399d2bda055560d4340a15088d.tar.gz libguestfs-5f30912d74a553399d2bda055560d4340a15088d.tar.xz libguestfs-5f30912d74a553399d2bda055560d4340a15088d.zip |
ruby: In event wrapper, ignore callback functions which have type T_ZOMBIE.
Note that in old versions of Ruby, T_ZOMBIE was not defined.
-rw-r--r-- | generator/generator_ruby.ml | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/generator/generator_ruby.ml b/generator/generator_ruby.ml index 7ab21772..1a3cabb7 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]; |