+Thu Mar 15 01:22:32 MET 2001 Raphael Manfredi <Raphael_Manfredi@pobox.com>
+
+. 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 <Raphael_Manfredi@pobox.com>
+
+. 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 <Raphael_Manfredi@pobox.com>
. Description:
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 <Raphael_Manfredi@pobox.com>
+
+. 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 <Raphael_Manfredi@pobox.com>
. Description:
-;# $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
;#
;# 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
;#
;# 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.
;#
use AutoLoader;
use vars qw($forgive_me $VERSION);
-$VERSION = '1.007';
+$VERSION = '1.011';
*AUTOLOAD = \&AutoLoader::AUTOLOAD; # Grrr...
#
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
*/
/*
- * $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
*
* 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
* 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.
*
#endif
#ifdef DEBUGME
+
+#ifndef DASSERT
+#define DASSERT
+#endif
+
/*
* TRACEME() will only output things when the $Storable::DEBUGME is true.
*/
} while (0)
#else
#define TRACEME(x)
-#endif
+#endif /* DEBUGME */
-#ifndef DASSERT
-#define DASSERT
-#endif
#ifdef DASSERT
#define ASSERT(x,y) do { \
if (!(x)) { \
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 */
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));
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);
}
{
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;
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 */
/*
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 */
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 */