--- BDB/BDB.xs 2008/07/09 12:15:36 1.41 +++ BDB/BDB.xs 2008/07/09 12:39:56 1.42 @@ -999,8 +999,7 @@ croak (# var " is not a valid " # class " object anymore"); \ } \ else \ - croak (# var " is not of type " # class); \ - \ + croak (# var " is not of type " # class); static void ptr_nuke (SV *sv) @@ -1048,16 +1047,30 @@ mg->mg_virtual = &vtbl_errno; } -static SV * +#if __GNUC__ >= 4 +# define noinline __attribute__ ((noinline)) +#else +# define noinline +#endif + +static noinline SV * pop_callback (I32 *ritems, SV *sv) { if (SvROK (sv)) { HV *st; GV *gvp; - CV *cv = sv_2cv (sv, &st, &gvp, 0); + CV *cv; + const char *name; + + /* forgive me */ + if (SvTYPE (SvRV (sv)) == SVt_PVMG + && (st = SvSTASH (SvRV (sv))) + && (name = HvNAME_get (st)) + && (name [0] == 'B' && name [1] == 'D' && name [2] == 'B' && name [3] == ':')) + return 0; - if (cv) + if ((cv = sv_2cv (sv, &st, &gvp, 0))) { --*ritems; return (SV *)cv;