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

Comparing BDB/BDB.xs (file contents):
Revision 1.6 by root, Tue Feb 6 01:09:04 2007 UTC vs.
Revision 1.7 by root, Thu Feb 8 22:14:01 2007 UTC

808 808
809#define SvPTR(var, arg, type, class, nullok) \ 809#define SvPTR(var, arg, type, class, nullok) \
810 if (!SvOK (arg)) \ 810 if (!SvOK (arg)) \
811 { \ 811 { \
812 if (!nullok) \ 812 if (!nullok) \
813 Perl_croak (# var " must be a " # class " object, not undef"); \ 813 croak (# var " must be a " # class " object, not undef"); \
814 \ 814 \
815 (var) = 0; \ 815 (var) = 0; \
816 } \ 816 } \
817 else if (sv_derived_from ((arg), # class)) \ 817 else if (sv_derived_from ((arg), # class)) \
818 { \ 818 { \
819 IV tmp = SvIV ((SV*) SvRV (arg)); \ 819 IV tmp = SvIV ((SV*) SvRV (arg)); \
820 (var) = INT2PTR (type, tmp); \ 820 (var) = INT2PTR (type, tmp); \
821 if (!var) \ 821 if (!var) \
822 Perl_croak (# var " is not a valid " # class " object anymore"); \ 822 croak (# var " is not a valid " # class " object anymore"); \
823 } \ 823 } \
824 else \ 824 else \
825 Perl_croak (# var " is not of type " # class); \ 825 croak (# var " is not of type " # class); \
826 \ 826 \
827 827
828static void 828static void
829ptr_nuke (SV *sv) 829ptr_nuke (SV *sv)
830{ 830{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines