From: Jarkko Hietaniemi Date: Thu, 15 Mar 2001 14:19:01 +0000 (+0000) Subject: Upgrade to Storable 1.0.11, from Raphael Manfredi. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8be2b38b938cfeca3db0a9ad0392d02c486ac312;p=p5sagit%2Fp5-mst-13.2.git Upgrade to Storable 1.0.11, from Raphael Manfredi. p4raw-id: //depot/perl@9169 --- diff --git a/ext/Storable/ChangeLog b/ext/Storable/ChangeLog index 1e33d73..bed6cec 100644 --- a/ext/Storable/ChangeLog +++ b/ext/Storable/ChangeLog @@ -1,3 +1,21 @@ +Thu Mar 15 01:22:32 MET 2001 Raphael Manfredi + +. Description: + + Last version was wrongly compiling with assertions on, due + to an edit glitch. That did not cause any problem (apart from + a slight performance loss) excepted on Win* platforms, where the + assertion code does not compile. + +Sat Feb 17 13:37:37 MET 2001 Raphael Manfredi + +. Description: + + Version 1.0.10. + + Forgot to increase version number at previous patch (there were + two of them, which is why we jump from 1.0.8 to 1.0.10). + Sat Feb 17 13:35:00 MET 2001 Raphael Manfredi . Description: @@ -76,6 +94,20 @@ Thu Oct 26 19:14:38 MEST 2000 Raphael Manfredi Just check $^O, in t/lock.t: there's no need to pull the whole Config module for that. +Mon Oct 23 20:03:49 MEST 2000 Raphael Manfredi + +. Description: + + Version 1.0.4. + + Protected calls to flock() for DOS platform: apparently, the + flock/fcnlt emulation is reported to be broken on that + platform. + + Added logcarp emulation if they don't have Log::Agent, since + we now use it to carp when lock_store/lock_retrieve is used + on DOS. + Fri Sep 29 21:52:29 MEST 2000 Raphael Manfredi . Description: diff --git a/ext/Storable/Storable.pm b/ext/Storable/Storable.pm index 85ecd13..86c5135 100644 --- a/ext/Storable/Storable.pm +++ b/ext/Storable/Storable.pm @@ -1,4 +1,4 @@ -;# $Id: Storable.pm,v 1.0.1.8 2001/02/17 12:24:37 ram Exp $ +;# $Id: Storable.pm,v 1.0.1.10 2001/03/15 00:20:25 ram Exp $ ;# ;# Copyright (c) 1995-2000, Raphael Manfredi ;# @@ -6,6 +6,12 @@ ;# in the README file that comes with the distribution. ;# ;# $Log: Storable.pm,v $ +;# Revision 1.0.1.10 2001/03/15 00:20:25 ram +;# patch11: updated version number +;# +;# Revision 1.0.1.9 2001/02/17 12:37:32 ram +;# patch10: forgot to increase version number at previous patch +;# ;# Revision 1.0.1.8 2001/02/17 12:24:37 ram ;# patch8: fixed incorrect error message ;# @@ -23,7 +29,16 @@ ;# patch4: protected calls to flock() for dos platform ;# patch4: added logcarp emulation if they don't have Log::Agent ;# -;# $Log: Storable.pm,v $ +;# Revision 1.0.1.3 2000/09/29 19:49:01 ram +;# patch3: updated version number +;# +;# Revision 1.0.1.2 2000/09/28 21:42:51 ram +;# patch2: added lock_store lock_nstore lock_retrieve +;# +;# Revision 1.0.1.1 2000/09/17 16:46:21 ram +;# patch1: documented that doubles are stringified by nstore() +;# patch1: added Salvador Ortiz Garcia in CREDITS section +;# ;# Revision 1.0 2000/09/01 19:40:41 ram ;# Baseline for first official release. ;# @@ -44,7 +59,7 @@ package Storable; @ISA = qw(Exporter DynaLoader); use AutoLoader; use vars qw($forgive_me $VERSION); -$VERSION = '1.007'; +$VERSION = '1.011'; *AUTOLOAD = \&AutoLoader::AUTOLOAD; # Grrr... # @@ -277,11 +292,10 @@ sub _retrieve { my $da = $@; # Could be from exception handler if ($use_locking) { unless (&CAN_FLOCK) { - logcarp "Storable::lock_retrieve: fcntl/flock emulation broken on $^O"; + logcarp "Storable::lock_store: fcntl/flock emulation broken on $^O"; return undef; } - flock(FILE, LOCK_SH) || - logcroak "can't get shared lock on $file: $!"; + flock(FILE, LOCK_SH) || logcroak "can't get shared lock on $file: $!"; # Unlocking will happen when FILE is closed } eval { $self = pretrieve(*FILE) }; # Call C routine diff --git a/ext/Storable/Storable.xs b/ext/Storable/Storable.xs index 62c5095..74fb5a0 100644 --- a/ext/Storable/Storable.xs +++ b/ext/Storable/Storable.xs @@ -3,7 +3,7 @@ */ /* - * $Id: Storable.xs,v 1.0.1.7 2001/02/17 12:25:26 ram Exp $ + * $Id: Storable.xs,v 1.0.1.8 2001/03/15 00:20:55 ram Exp $ * * Copyright (c) 1995-2000, Raphael Manfredi * @@ -11,6 +11,9 @@ * in the README file that comes with the distribution. * * $Log: Storable.xs,v $ + * Revision 1.0.1.8 2001/03/15 00:20:55 ram + * patch11: last version was wrongly compiling with assertions on + * * Revision 1.0.1.7 2001/02/17 12:25:26 ram * patch8: now bless objects ASAP at retrieve time * patch8: added support for blessed ref to tied structures @@ -29,7 +32,14 @@ * Revision 1.0.1.3 2000/09/29 19:49:57 ram * patch3: avoid using "tainted" and "dirty" since Perl remaps them via cpp * - * $Log: Storable.xs,v $ + * Revision 1.0.1.2 2000/09/28 21:43:10 ram + * patch2: perls before 5.004_04 lack newSVpvn + * + * Revision 1.0.1.1 2000/09/17 16:47:49 ram + * patch1: now only taint retrieved data when source was tainted + * patch1: added support for UTF-8 strings + * patch1: fixed store hook bug: was allocating class id too soon + * * Revision 1.0 2000/09/01 19:40:41 ram * Baseline for first official release. * @@ -106,6 +116,11 @@ typedef double NV; /* Older perls lack the NV type */ #endif #ifdef DEBUGME + +#ifndef DASSERT +#define DASSERT +#endif + /* * TRACEME() will only output things when the $Storable::DEBUGME is true. */ @@ -116,11 +131,8 @@ typedef double NV; /* Older perls lack the NV type */ } while (0) #else #define TRACEME(x) -#endif +#endif /* DEBUGME */ -#ifndef DASSERT -#define DASSERT -#endif #ifdef DASSERT #define ASSERT(x,y) do { \ if (!(x)) { \ @@ -3074,7 +3086,7 @@ static SV *retrieve_idx_blessed(stcxt_t *cxt, char *cname) sva = av_fetch(cxt->aclass, idx, FALSE); if (!sva) - CROAK(("Class name #%d should have been seen already", (int)idx)); + CROAK(("Class name #%d should have been seen already", idx)); class = SvPVX(*sva); /* We know it's a PV, by construction */ @@ -3269,7 +3281,7 @@ static SV *retrieve_hook(stcxt_t *cxt, char *cname) sva = av_fetch(cxt->aclass, idx, FALSE); if (!sva) - CROAK(("Class name #%d should have been seen already", (int)idx)); + CROAK(("Class name #%d should have been seen already", idx)); class = SvPVX(*sva); /* We know it's a PV, by construction */ TRACEME(("class ID %d => %s", idx, class)); @@ -3370,7 +3382,7 @@ static SV *retrieve_hook(stcxt_t *cxt, char *cname) tag = ntohl(tag); svh = av_fetch(cxt->aseen, tag, FALSE); if (!svh) - CROAK(("Object #%d should have been retrieved already", (int)tag)); + CROAK(("Object #%d should have been retrieved already", tag)); xsv = *svh; ary[i] = SvREFCNT_inc(xsv); } @@ -3994,18 +4006,15 @@ static SV *retrieve_byte(stcxt_t *cxt, char *cname) { SV *sv; int siv; - signed char tmp; TRACEME(("retrieve_byte (#%d)", cxt->tagnum)); GETMARK(siv); TRACEME(("small integer read as %d", (unsigned char) siv)); - tmp = ((unsigned char)siv) - 128; - sv = newSViv (tmp); - + sv = newSViv((unsigned char) siv - 128); SEEN(sv, cname); /* Associate this new scalar with tag "tagnum" */ - TRACEME(("byte %d", tmp)); + TRACEME(("byte %d", (unsigned char) siv - 128)); TRACEME(("ok (retrieve_byte at 0x%"UVxf")", PTR2UV(sv))); return sv; @@ -4519,7 +4528,7 @@ static SV *retrieve(stcxt_t *cxt, char *cname) I32 tagn; svh = hv_fetch(cxt->hseen, (char *) &tag, sizeof(tag), FALSE); if (!svh) - CROAK(("Old tag 0x%x should have been mapped already", (unsigned)tag)); + CROAK(("Old tag 0x%x should have been mapped already", tag)); tagn = SvIV(*svh); /* Mapped tag number computed earlier below */ /* @@ -4528,7 +4537,7 @@ static SV *retrieve(stcxt_t *cxt, char *cname) svh = av_fetch(cxt->aseen, tagn, FALSE); if (!svh) - CROAK(("Object #%d should have been retrieved already", (int)tagn)); + CROAK(("Object #%d should have been retrieved already", tagn)); sv = *svh; TRACEME(("has retrieved #%d at 0x%"UVxf, tagn, PTR2UV(sv))); SvREFCNT_inc(sv); /* One more reference to this same sv */ @@ -4569,7 +4578,7 @@ again: tag = ntohl(tag); svh = av_fetch(cxt->aseen, tag, FALSE); if (!svh) - CROAK(("Object #%d should have been retrieved already", (int)tag)); + CROAK(("Object #%d should have been retrieved already", tag)); sv = *svh; TRACEME(("had retrieved #%d at 0x%"UVxf, tag, PTR2UV(sv))); SvREFCNT_inc(sv); /* One more reference to this same sv */