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-08-05 22:48:53 +0100 |
commit | 7a31280ea3978bf8d7f05fe58c6e96cb4431f9df (patch) | |
tree | d5df583160f0baa20beaf57188e2cc1f7eb3cc3c | |
parent | ad3c52bd48cd1e8b24e731452e4cb1f27c074e12 (diff) | |
download | libguestfs-7a31280ea3978bf8d7f05fe58c6e96cb4431f9df.tar.gz libguestfs-7a31280ea3978bf8d7f05fe58c6e96cb4431f9df.tar.xz libguestfs-7a31280ea3978bf8d7f05fe58c6e96cb4431f9df.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.
(cherry picked from commit 5f30912d74a553399d2bda055560d4340a15088d)
-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 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]; |