+# We ignore the return value of ZOOM_options_set_callback(), since it
+# is always just the address of the __ZOOM_option_callback() function.
+# The information that we actually want -- the address of the Perl
+# function in the callback_block -- is unavailable to us, as the
+# underlying C function doesn't give the block back.
+#
+# TESTED
+void
+ZOOM_options_set_callback(opt, function, handle)
+ ZOOM_options opt
+ SV* function;
+ SV* handle;
+ CODE:
+ /* The tiny amount of memory allocated here is never
+ * released, as options_destroy() doesn't do anything
+ * to the callback information. Not a big deal.
+ * Also, I have no idea how to drive the Perl "mortal"
+ * reference-counting stuff, so I am just allocating
+ * copies which also never get released. Don't sue!
+ */
+ struct callback_block *block = (struct callback_block*)
+ xmalloc(sizeof *block);
+ block->function = function;
+ block->handle = handle;
+ SvREFCNT(block->function);
+ SvREFCNT(block->handle);
+ ZOOM_options_set_callback(opt, __ZOOM_option_callback,
+ (void*) block);