ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/BDB/BDB.xs
(Generate patch)

Comparing BDB/BDB.xs (file contents):
Revision 1.41 by root, Wed Jul 9 12:15:36 2008 UTC vs.
Revision 1.42 by root, Wed Jul 9 12:39:56 2008 UTC

997 (var) = INT2PTR (type, tmp); \ 997 (var) = INT2PTR (type, tmp); \
998 if (!var && nullok != 2) \ 998 if (!var && nullok != 2) \
999 croak (# var " is not a valid " # class " object anymore"); \ 999 croak (# var " is not a valid " # class " object anymore"); \
1000 } \ 1000 } \
1001 else \ 1001 else \
1002 croak (# var " is not of type " # class); \ 1002 croak (# var " is not of type " # class);
1003 \
1004 1003
1005static void 1004static void
1006ptr_nuke (SV *sv) 1005ptr_nuke (SV *sv)
1007{ 1006{
1008 assert (SvROK (sv)); 1007 assert (SvROK (sv));
1046 vtbl_errno = PL_vtbl_sv; 1045 vtbl_errno = PL_vtbl_sv;
1047 vtbl_errno.svt_get = errno_get; 1046 vtbl_errno.svt_get = errno_get;
1048 mg->mg_virtual = &vtbl_errno; 1047 mg->mg_virtual = &vtbl_errno;
1049} 1048}
1050 1049
1051static SV * 1050#if __GNUC__ >= 4
1051# define noinline __attribute__ ((noinline))
1052#else
1053# define noinline
1054#endif
1055
1056static noinline SV *
1052pop_callback (I32 *ritems, SV *sv) 1057pop_callback (I32 *ritems, SV *sv)
1053{ 1058{
1054 if (SvROK (sv)) 1059 if (SvROK (sv))
1055 { 1060 {
1056 HV *st; 1061 HV *st;
1057 GV *gvp; 1062 GV *gvp;
1063 CV *cv;
1064 const char *name;
1065
1066 /* forgive me */
1067 if (SvTYPE (SvRV (sv)) == SVt_PVMG
1068 && (st = SvSTASH (SvRV (sv)))
1069 && (name = HvNAME_get (st))
1070 && (name [0] == 'B' && name [1] == 'D' && name [2] == 'B' && name [3] == ':'))
1071 return 0;
1072
1058 CV *cv = sv_2cv (sv, &st, &gvp, 0); 1073 if ((cv = sv_2cv (sv, &st, &gvp, 0)))
1059
1060 if (cv)
1061 { 1074 {
1062 --*ritems; 1075 --*ritems;
1063 return (SV *)cv; 1076 return (SV *)cv;
1064 } 1077 }
1065 } 1078 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines