On Mon, 28 Apr 2008, Nicholas Clark wrote: > On Mon, Apr 28, 2008 at 11:50:37PM +0100, Nicholas Clark wrote: > > On Mon, Apr 28, 2008 at 03:48:35PM -0700, Jan Dubois wrote: > > > > > Use the GV_ADDMULTI flag: > > > > > > if (sv = get_sv("Win32::SqlServer::Version", TRUE | GV_ADDMULTI)) > > > > Really that should be > > > > if (sv = get_sv("Win32::SqlServer::Version", GV_ADD | GV_ADDMULTI)) > > > > The flags to get_sv() were always a bitmask, never a simple TRUE/FALSE, but > > until recently the documentation wasn't very good. > > Excuse me while I pop out for a little trip in my time machine. The > documentation is still actually wrong. get_sv() and friends all call > gv_fetchpv(), and it has always taken a bitmask, but none of its callers > have made this clear.
It didn't really matter that much because TRUE and GV_ADD have the same value (1), but that's obviously not a good thing to rely on. So I guess this code in perl.c should also be updated to use GV_ADD: if (PL_minus_a) { (void) get_av("main::F", TRUE | GV_ADDMULTI); } Cheers, -Jan