From: Rafael Garcia-Suarez Date: Sat, 12 Mar 2005 17:15:23 +0000 (+0000) Subject: Upgrade to DB_File 1.811, by Paul Marquess X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=dcdb9d1fbeae272f94bb6c224713fdfcd57e2d73;p=p5sagit%2Fp5-mst-13.2.git Upgrade to DB_File 1.811, by Paul Marquess p4raw-id: //depot/perl@24028 --- diff --git a/ext/DB_File/Changes b/ext/DB_File/Changes index 89027d1..d2c5343 100644 --- a/ext/DB_File/Changes +++ b/ext/DB_File/Changes @@ -1,11 +1,17 @@ +1.811 12th March 2005 + + * Fixed DBM filter bug in seq + 1.810 7th August 2004 * Fixed db-hash.t for Cygwin * Added substr tests to db-hast.t + * Documented AIX build problem in README. + 1.809 20th June 2004 * Merged core patch 22258 diff --git a/ext/DB_File/DB_File.pm b/ext/DB_File/DB_File.pm index 5ddac46..40098e3 100644 --- a/ext/DB_File/DB_File.pm +++ b/ext/DB_File/DB_File.pm @@ -1,10 +1,10 @@ # DB_File.pm -- Perl 5 interface to Berkeley DB # # written by Paul Marquess (pmqs@cpan.org) -# last modified 7th August 2004 -# version 1.810 +# last modified 12th March 2005 +# version 1.811 # -# Copyright (c) 1995-2004 Paul Marquess. All rights reserved. +# Copyright (c) 1995-2005 Paul Marquess. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. @@ -165,7 +165,7 @@ our ($db_version, $use_XSLoader, $splice_end_array); use Carp; -$VERSION = "1.810" ; +$VERSION = "1.811" ; { local $SIG{__WARN__} = sub {$splice_end_array = "@_";}; @@ -2253,7 +2253,7 @@ compile properly on IRIX 5.3. =head1 COPYRIGHT -Copyright (c) 1995-2004 Paul Marquess. All rights reserved. This program +Copyright (c) 1995-2005 Paul Marquess. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/ext/DB_File/DB_File.xs b/ext/DB_File/DB_File.xs index 8f6cec1..76f9eb8 100644 --- a/ext/DB_File/DB_File.xs +++ b/ext/DB_File/DB_File.xs @@ -3,12 +3,12 @@ DB_File.xs -- Perl 5 interface to Berkeley DB written by Paul Marquess - last modified 7th August 2004 - version 1.810 + last modified 12th March 2005 + version 1.811 All comments/suggestions/problems are welcome - Copyright (c) 1995-2004 Paul Marquess. All rights reserved. + Copyright (c) 1995-2005 Paul Marquess. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. @@ -110,6 +110,7 @@ 1.808 - leak fixed in ParseOpenInfo 1.809 - no change 1.810 - no change + 1.811 - no change */ diff --git a/ext/DB_File/t/db-hash.t b/ext/DB_File/t/db-hash.t index 018952f..bd403cd 100755 --- a/ext/DB_File/t/db-hash.t +++ b/ext/DB_File/t/db-hash.t @@ -582,8 +582,8 @@ EOM ($fetch_key, $store_key, $fetch_value, $store_value) = ("") x 4 ; $k = 'Fred'; $v =''; ok(74, ! $db->seq($k, $v, R_FIRST) ) ; - ok(75, $k eq "Fred") ; - #print "k [$k]\n" ; + ok(75, $k eq "FRED") or + print "# k [$k]\n" ; ok(76, $v eq "[Jxe]") ; # fk sk fv sv ok(77, checkOutput( "FRED", "fred", "[Jxe]", "")) ; diff --git a/ext/DB_File/typemap b/ext/DB_File/typemap index f159995..077a95c 100644 --- a/ext/DB_File/typemap +++ b/ext/DB_File/typemap @@ -15,29 +15,35 @@ DBTKEY T_dbtkeydatum INPUT T_dbtkeydatum - DBM_ckFilter($arg, filter_store_key, \"filter_store_key\"); + { + SV * my_sv = $arg; + DBM_ckFilter(my_sv, filter_store_key, \"filter_store_key\"); DBT_clear($var) ; - SvGETMAGIC($arg) ; + SvGETMAGIC(my_sv) ; if (db->type == DB_RECNO) { - if (SvOK($arg)) - Value = GetRecnoKey(aTHX_ db, SvIV($arg)) ; + if (SvOK(my_sv)) + Value = GetRecnoKey(aTHX_ db, SvIV(my_sv)) ; else Value = 1 ; $var.data = & Value; $var.size = (int)sizeof(recno_t); } - else if (SvOK($arg)) { - $var.data = SvPVbyte($arg, PL_na); + else if (SvOK(my_sv)) { + $var.data = SvPVbyte(my_sv, PL_na); $var.size = (int)PL_na; } + } T_dbtdatum - DBM_ckFilter($arg, filter_store_value, \"filter_store_value\"); + { + SV * my_sv = $arg; + DBM_ckFilter(my_sv, filter_store_value, \"filter_store_value\"); DBT_clear($var) ; - SvGETMAGIC($arg) ; - if (SvOK($arg)) { - $var.data = SvPVbyte($arg, PL_na); + SvGETMAGIC(my_sv) ; + if (SvOK(my_sv)) { + $var.data = SvPVbyte(my_sv, PL_na); $var.size = (int)PL_na; } + } OUTPUT