From: Paul Marquess Date: Sun, 27 Apr 1997 14:12:59 +0000 (+0100) Subject: Refresh DB_File to 1.13 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d3ef3b8a4f656692c6e533ff21ee112d547c4519;p=p5sagit%2Fp5-mst-13.2.git Refresh DB_File to 1.13 Subject: DB_File 1.13 patch Here is the patch to (hopefully) fix the casting warnings. p5p-msgid: 9704271413.AA08876@claudius.bfsec.bt.co.uk --- diff --git a/ext/DB_File/DB_File.pm b/ext/DB_File/DB_File.pm index 5a88228..65928aa 100644 --- a/ext/DB_File/DB_File.pm +++ b/ext/DB_File/DB_File.pm @@ -1,8 +1,8 @@ # DB_File.pm -- Perl 5 interface to Berkeley DB # # written by Paul Marquess (pmarquess@bfsec.bt.co.uk) -# last modified 12th Mar 1997 -# version 1.12 +# last modified 27th Apr 1997 +# version 1.13 # # Copyright (c) 1995, 1996, 1997 Paul Marquess. All rights reserved. # This program is free software; you can redistribute it and/or @@ -146,7 +146,7 @@ use vars qw($VERSION @ISA @EXPORT $AUTOLOAD $DB_BTREE $DB_HASH $DB_RECNO) ; use Carp; -$VERSION = "1.12" ; +$VERSION = "1.13" ; #typedef enum { DB_BTREE, DB_HASH, DB_RECNO } DBTYPE; $DB_BTREE = new DB_File::BTREEINFO ; @@ -1648,6 +1648,10 @@ Documented the untie gotcha. Documented the incompatibility with version 2 of Berkeley DB. +=item 1.13 + +Minor changes to DB_FIle.xs and DB_File.pm + =back =head1 BUGS @@ -1704,7 +1708,7 @@ L, L, L, L, L The DB_File interface was written by Paul Marquess Epmarquess@bfsec.bt.co.ukE. -Questions about the DB system itself may be addressed to Keith Bostic -Ebostic@cs.berkeley.eduE. +Questions about the DB system itself may be addressed to +Edb@sleepycat.com. =cut diff --git a/ext/DB_File/DB_File.xs b/ext/DB_File/DB_File.xs index 93cf44aa..cd9f1d1 100644 --- a/ext/DB_File/DB_File.xs +++ b/ext/DB_File/DB_File.xs @@ -3,8 +3,8 @@ DB_File.xs -- Perl 5 interface to Berkeley DB written by Paul Marquess (pmarquess@bfsec.bt.co.uk) - last modified 12th Mar 1997 - version 1.12 + last modified 27th Apr 1997 + version 1.13 All comments/suggestions/problems are welcome @@ -39,6 +39,7 @@ in-memory files when db 1.86 is used. 1.11 - No change to DB_File.xs 1.12 - No change to DB_File.xs + 1.13 - Tidied up a few casts. */ @@ -283,7 +284,7 @@ RECNOINFO * recno ; printf (" cachesize = %d\n", recno->cachesize) ; printf (" psize = %d\n", recno->psize) ; printf (" lorder = %d\n", recno->lorder) ; - printf (" reclen = %d\n", recno->reclen) ; + printf (" reclen = %lu\n", (unsigned long)recno->reclen) ; printf (" bval = %d 0x%x\n", recno->bval, recno->bval) ; printf (" bfname = %d [%s]\n", recno->bfname, recno->bfname) ; } @@ -466,19 +467,19 @@ SV * sv ; openinfo = (void *)info ; svp = hv_fetch(action, "flags", 5, FALSE); - info->recno.flags = (u_long) svp ? SvIV(*svp) : 0; + info->recno.flags = (u_long) (svp ? SvIV(*svp) : 0); svp = hv_fetch(action, "cachesize", 9, FALSE); - info->recno.cachesize = (u_int) svp ? SvIV(*svp) : 0; + info->recno.cachesize = (u_int) (svp ? SvIV(*svp) : 0); svp = hv_fetch(action, "psize", 5, FALSE); - info->recno.psize = (int) svp ? SvIV(*svp) : 0; + info->recno.psize = (u_int) (svp ? SvIV(*svp) : 0); svp = hv_fetch(action, "lorder", 6, FALSE); - info->recno.lorder = (int) svp ? SvIV(*svp) : 0; + info->recno.lorder = (int) (svp ? SvIV(*svp) : 0); svp = hv_fetch(action, "reclen", 6, FALSE); - info->recno.reclen = (size_t) svp ? SvIV(*svp) : 0; + info->recno.reclen = (size_t) (svp ? SvIV(*svp) : 0); svp = hv_fetch(action, "bval", 4, FALSE); if (svp && SvOK(*svp)) @@ -499,7 +500,7 @@ SV * sv ; svp = hv_fetch(action, "bfname", 6, FALSE); if (svp && SvOK(*svp)) { char * ptr = SvPV(*svp,na) ; - info->recno.bfname = (char*) na ? ptr : NULL ; + info->recno.bfname = (char*) (na ? ptr : NULL) ; } else info->recno.bfname = NULL ;