Tenno Seremel [2010-02-06 20:36]:
> >I don't understand the question. The caller ignores the return value.
>
> Here is an example:
> [...]
> 
> Try to run it. You'll get
> 
> test.rb:29:in `run': can't convert Array into Integer (TypeError)
>         from test.rb:29
> 
> error message.
> 
> That is. Return value here (playback_current_id.notifier) does nothing
> since it'll be executed only once anyway. However it fails.
> Because in this case result of this block is
> ['siduh', '9e7ryt', 83476, :moo]
> An array.
> 
> >The code in the Ruby bindings is this:
> 
> ret = (something-that-is-actually-array)
> 
> >(ret == Qnil || ret == Qfalse)
> No.
> 
> >(ret == Qtrue)
> No.
> 
> >NUM2INT(something-that-is-actually-array)
> Wha...

Right, things are messed up.

When I said "the caller ignores the return value", that caller was
libxmmsclient. Clearly the Ruby bindings never ignore the return value.

It's nice how the line of code of which I don't remember why/if
it's needed is causing problems =)

ISTR that Sebastien or Erik wanted to make signals return integers to
make the daemon throttle signal emission rates. Or something.
Maybe we should tell Ruby client authors to return integers from their
blocks? Where 0 is used to abort broadcast/signal stuff...?

Regards,
Tilman

-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?

Attachment: pgp2q36P0WIUf.pgp
Description: PGP signature

--
_______________________________________________
Xmms2-devel mailing list
Xmms2-devel@lists.xmms.se
http://lists.xmms.se/cgi-bin/mailman/listinfo/xmms2-devel

Reply via email to