Re: Strange bug



muppet wrote:

in gtk2perl.h, you can find the variant typedefs and macros for GdkBitmap. a bug is on line 58.

#define SvGdkBitmap_ornull(sv) (((sv) == &PL_sv_undef) ? NULL : SvGdkBitmap(sv))

should be

#define SvGdkBitmap_ornull(sv) (((sv) && SvTRUE (sv)) ? NULL : SvGdkBitmap(sv))


that may not be *the* bug, but it should help.  let me know.


NOW WAIT A MINUTE!

Isn't that ternary going exactly the opposite direction of what it is supposed to? That is, shouldn't it be:

#define SvGdkBitmap_ornull(sv) (((sv) && SvTRUE (sv)) ? SvGdkBitmap(sv) : NULL)

BTW, there is another suspicious test for PL_sv_undef in Glib/GValue.xs

Bjarne




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