Re: [PATCHES] Re: Gtk2::AboutDialog trouble



muppet wrote:

i whipped up a quick patch that adds support for this type as a plain 
perl type -- that is,
[...]

Great, the patch works seamlessly, thanks for the quick reply.

work as you'd expect.  As a bonus, it was easy to add a special case 
that any non-reference scalar would be interpreted as a single-element 
list, so that

      $about->set (authors => 'me');

should also work.  Both undef and an empty array are interpreted as 
NULL (an empty string vector).  Such magic may not be desirable; what 
does everybody think?

I like this magic, I would even expect it and probably complain if it 
wouldn't be there ;) Also it goes with the handling of 
flags/enumerables, which could be passed as a plain string or array ref
as well.

the easy fix, though, is to change SvPV_nolen to SvGChar.

I guessed that adding sv_utf8_upgrade() wouldn't be the "right" 
solution, because it's so seldom used in the whole Gtk2/xs sources ;)

Thanks,

Joern

-- 
Think before you code. And while you're doing it probably won't hurt. ;)

Attachment: pgpx7aoCEl7j9.pgp
Description: PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]