--- GType.xs 02 Jun 2008 09:38:05 +1000 1.92 +++ GType.xs 20 Jun 2008 18:10:11 +1000 @@ -2773,7 +2773,7 @@ RETVAL SV * -union (SV *a, SV *b, int swap) +union (SV *a, SV *b, SV *swap) ALIAS: sub = 1 intersect = 2 @@ -2783,12 +2783,13 @@ { GType gtype; const char *package; - gint a_, b_; + gint a_, b_, swap_; package = sv_reftype (SvRV (a), TRUE); gtype = gperl_fundamental_type_from_package (package); - a_ = gperl_convert_flags (gtype, swap ? b : a); - b_ = gperl_convert_flags (gtype, swap ? a : b); + swap_ = SvTRUE (swap); + a_ = gperl_convert_flags (gtype, swap_ ? b : a); + b_ = gperl_convert_flags (gtype, swap_ ? a : b); switch (ix) { case 0: a_ |= b_; break;