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.43 by root, Wed Jul 9 12:55:57 2008 UTC

411 return !SvTRUE (ERRSV); 411 return !SvTRUE (ERRSV);
412} 412}
413 413
414static void req_free (bdb_req req) 414static void req_free (bdb_req req)
415{ 415{
416 SvREFCNT_dec (req->callback);
417
416 free (req->buf1); 418 free (req->buf1);
417 free (req->buf2); 419 free (req->buf2);
418 free (req->buf3); 420 free (req->buf3);
421
419 Safefree (req); 422 Safefree (req);
420} 423}
421 424
422#ifdef USE_SOCKETS_AS_HANDLES 425#ifdef USE_SOCKETS_AS_HANDLES
423# define TO_SOCKET(x) (win32_get_osfhandle (x)) 426# define TO_SOCKET(x) (win32_get_osfhandle (x))
997 (var) = INT2PTR (type, tmp); \ 1000 (var) = INT2PTR (type, tmp); \
998 if (!var && nullok != 2) \ 1001 if (!var && nullok != 2) \
999 croak (# var " is not a valid " # class " object anymore"); \ 1002 croak (# var " is not a valid " # class " object anymore"); \
1000 } \ 1003 } \
1001 else \ 1004 else \
1002 croak (# var " is not of type " # class); \ 1005 croak (# var " is not of type " # class);
1003 \
1004 1006
1005static void 1007static void
1006ptr_nuke (SV *sv) 1008ptr_nuke (SV *sv)
1007{ 1009{
1008 assert (SvROK (sv)); 1010 assert (SvROK (sv));
1046 vtbl_errno = PL_vtbl_sv; 1048 vtbl_errno = PL_vtbl_sv;
1047 vtbl_errno.svt_get = errno_get; 1049 vtbl_errno.svt_get = errno_get;
1048 mg->mg_virtual = &vtbl_errno; 1050 mg->mg_virtual = &vtbl_errno;
1049} 1051}
1050 1052
1051static SV * 1053#if __GNUC__ >= 4
1054# define noinline __attribute__ ((noinline))
1055#else
1056# define noinline
1057#endif
1058
1059static noinline SV *
1052pop_callback (I32 *ritems, SV *sv) 1060pop_callback (I32 *ritems, SV *sv)
1053{ 1061{
1054 if (SvROK (sv)) 1062 if (SvROK (sv))
1055 { 1063 {
1056 HV *st; 1064 HV *st;
1057 GV *gvp; 1065 GV *gvp;
1066 CV *cv;
1067 const char *name;
1068
1069 /* forgive me */
1070 if (SvTYPE (SvRV (sv)) == SVt_PVMG
1071 && (st = SvSTASH (SvRV (sv)))
1072 && (name = HvNAME_get (st))
1073 && (name [0] == 'B' && name [1] == 'D' && name [2] == 'B' && name [3] == ':'))
1074 return 0;
1075
1058 CV *cv = sv_2cv (sv, &st, &gvp, 0); 1076 if ((cv = sv_2cv (sv, &st, &gvp, 0)))
1059
1060 if (cv)
1061 { 1077 {
1062 --*ritems; 1078 --*ritems;
1063 return (SV *)cv; 1079 return (SV *)cv;
1064 } 1080 }
1065 } 1081 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines