r28121 - in /branches/upstream/libclone-perl/current: Changes Clone.pm Clone.xs MANIFEST META.yml Makefile.PL t/01array.t t/02hash.t t/03scalar.t t/04tie.t t/05dtype.t t/06refcnt.t t/07magic.t t/dclone.t t/tied.pl
bricas-guest at users.alioth.debian.org
bricas-guest at users.alioth.debian.org
Fri Dec 12 14:59:38 UTC 2008
Author: bricas-guest
Date: Fri Dec 12 14:59:35 2008
New Revision: 28121
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=28121
Log:
[svn-upgrade] Integrating new upstream version, libclone-perl (0.30)
Modified:
branches/upstream/libclone-perl/current/Changes
branches/upstream/libclone-perl/current/Clone.pm
branches/upstream/libclone-perl/current/Clone.xs
branches/upstream/libclone-perl/current/MANIFEST
branches/upstream/libclone-perl/current/META.yml
branches/upstream/libclone-perl/current/Makefile.PL
branches/upstream/libclone-perl/current/t/01array.t
branches/upstream/libclone-perl/current/t/02hash.t
branches/upstream/libclone-perl/current/t/03scalar.t
branches/upstream/libclone-perl/current/t/04tie.t
branches/upstream/libclone-perl/current/t/05dtype.t
branches/upstream/libclone-perl/current/t/06refcnt.t
branches/upstream/libclone-perl/current/t/07magic.t
branches/upstream/libclone-perl/current/t/dclone.t
branches/upstream/libclone-perl/current/t/tied.pl
Modified: branches/upstream/libclone-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libclone-perl/current/Changes?rev=28121&op=diff
==============================================================================
--- branches/upstream/libclone-perl/current/Changes (original)
+++ branches/upstream/libclone-perl/current/Changes Fri Dec 12 14:59:35 2008
@@ -1,7 +1,7 @@
Revision history for Perl extension Clone.
$Log: Changes,v $
-Revision 0.26 2007-10-15 04:52:42 ray
+Revision 0.26 2007/10/15 04:52:42 ray
Made a change in CLONE_KEY to the way Clone stores refs in the ref hash.
Perl no longer uses the SvANY part of the SV struct in the same way which
meams the old way of storing the hash key is no longer unique.
Modified: branches/upstream/libclone-perl/current/Clone.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libclone-perl/current/Clone.pm?rev=28121&op=diff
==============================================================================
--- branches/upstream/libclone-perl/current/Clone.pm (original)
+++ branches/upstream/libclone-perl/current/Clone.pm Fri Dec 12 14:59:35 2008
@@ -1,4 +1,4 @@
-# $Id: Clone.pm,v 0.29 2008-07-12 16:49:01 ray Exp $
+# $Id: Clone.pm,v 0.30 2008/12/12 04:01:15 ray Exp $
package Clone;
use strict;
@@ -16,7 +16,7 @@
@EXPORT = qw();
@EXPORT_OK = qw( clone );
-$VERSION = '0.29';
+$VERSION = '0.30';
bootstrap Clone $VERSION;
Modified: branches/upstream/libclone-perl/current/Clone.xs
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libclone-perl/current/Clone.xs?rev=28121&op=diff
==============================================================================
--- branches/upstream/libclone-perl/current/Clone.xs (original)
+++ branches/upstream/libclone-perl/current/Clone.xs Fri Dec 12 14:59:35 2008
@@ -4,15 +4,15 @@
#include "perl.h"
#include "XSUB.h"
-static char *rcs_id = "$Id: Clone.xs,v 0.28 2008-07-12 16:49:01 ray Exp $";
+static char *rcs_id = "$Id: Clone.xs,v 0.30 2008/12/12 04:00:12 ray Exp $";
#define CLONE_KEY(x) ((char *) &x)
#define CLONE_STORE(x,y) \
do { \
- if (!hv_store(HSEEN, CLONE_KEY(x), PTRSIZE, SvREFCNT_inc(y), 0)) { \
+ if (!hv_store(hseen, CLONE_KEY(x), PTRSIZE, SvREFCNT_inc(y), 0)) { \
SvREFCNT_dec(y); /* Restore the refcount */ \
- croak("Can't store clone in seen hash (HSEEN)"); \
+ croak("Can't store clone in seen hash (hseen)"); \
} \
else { \
TRACEME(("storing ref = 0x%x clone = 0x%x\n", ref, clone)); \
@@ -21,14 +21,12 @@
} \
} while (0)
-#define CLONE_FETCH(x) (hv_fetch(HSEEN, CLONE_KEY(x), PTRSIZE, 0))
-
-static SV *hv_clone (SV *, SV *, int);
-static SV *av_clone (SV *, SV *, int);
-static SV *sv_clone (SV *, int);
-static SV *rv_clone (SV *, int);
-
-static HV *HSEEN;
+#define CLONE_FETCH(x) (hv_fetch(hseen, CLONE_KEY(x), PTRSIZE, 0))
+
+static SV *hv_clone (SV *, SV *, HV *, int);
+static SV *av_clone (SV *, SV *, HV *, int);
+static SV *sv_clone (SV *, HV *, int);
+static SV *rv_clone (SV *, HV *, int);
#ifdef DEBUG_CLONE
#define TRACEME(a) printf("%s:%d: ",__FUNCTION__, __LINE__) && printf a;
@@ -37,7 +35,7 @@
#endif
static SV *
-hv_clone (SV * ref, SV * target, int depth)
+hv_clone (SV * ref, SV * target, HV* hseen, int depth)
{
HV *clone = (HV *) target;
HV *self = (HV *) ref;
@@ -52,8 +50,9 @@
while (next = hv_iternext (self))
{
SV *key = hv_iterkeysv (next);
+ TRACEME(("clone item %s\n", SvPV_nolen(key) ));
hv_store_ent (clone, key,
- sv_clone (hv_iterval (self, next), recur), 0);
+ sv_clone (hv_iterval (self, next), hseen, recur), 0);
}
TRACEME(("clone = 0x%x(%d)\n", clone, SvREFCNT(clone)));
@@ -61,7 +60,7 @@
}
static SV *
-av_clone (SV * ref, SV * target, int depth)
+av_clone (SV * ref, SV * target, HV* hseen, int depth)
{
AV *clone = (AV *) target;
AV *self = (AV *) ref;
@@ -87,7 +86,7 @@
{
svp = av_fetch (self, i, 0);
if (svp)
- av_store (clone, i, sv_clone (*svp, recur));
+ av_store (clone, i, sv_clone (*svp, hseen, recur));
}
TRACEME(("clone = 0x%x(%d)\n", clone, SvREFCNT(clone)));
@@ -95,7 +94,7 @@
}
static SV *
-rv_clone (SV * ref, int depth)
+rv_clone (SV * ref, HV* hseen, int depth)
{
SV *clone = NULL;
SV *rv = NULL;
@@ -109,18 +108,18 @@
if (sv_isobject (ref))
{
- clone = newRV_noinc(sv_clone (SvRV(ref), depth));
+ clone = newRV_noinc(sv_clone (SvRV(ref), hseen, depth));
sv_2mortal (sv_bless (clone, SvSTASH (SvRV (ref))));
}
else
- clone = newRV_inc(sv_clone (SvRV(ref), depth));
+ clone = newRV_inc(sv_clone (SvRV(ref), hseen, depth));
TRACEME(("clone = 0x%x(%d)\n", clone, SvREFCNT(clone)));
return clone;
}
static SV *
-sv_clone (SV * ref, int depth)
+sv_clone (SV * ref, HV* hseen, int depth)
{
SV *clone = ref;
SV **seen = NULL;
@@ -251,8 +250,11 @@
case '<': /* PERL_MAGIC_backref */
continue;
break;
+ case '@': /* PERL_MAGIC_arylen_p */
+ continue;
+ break;
default:
- obj = sv_clone(mg->mg_obj, -1);
+ obj = sv_clone(mg->mg_obj, hseen, -1);
}
} else {
TRACEME(("magic object for type %c in NULL\n", mg->mg_type));
@@ -275,15 +277,15 @@
;;
}
else if ( SvTYPE(ref) == SVt_PVHV )
- clone = hv_clone (ref, clone, depth);
+ clone = hv_clone (ref, clone, hseen, depth);
else if ( SvTYPE(ref) == SVt_PVAV )
- clone = av_clone (ref, clone, depth);
+ clone = av_clone (ref, clone, hseen, depth);
/* 3: REFERENCE (inlined for speed) */
else if (SvROK (ref))
{
TRACEME(("clone = 0x%x(%d)\n", clone, SvREFCNT(clone)));
SvREFCNT_dec(SvRV(clone));
- SvRV(clone) = sv_clone (SvRV(ref), depth); /* Clone the referent */
+ SvRV(clone) = sv_clone (SvRV(ref), hseen, depth); /* Clone the referent */
if (sv_isobject (ref))
{
sv_bless (clone, SvSTASH (SvRV (ref)));
@@ -301,10 +303,6 @@
PROTOTYPES: ENABLE
-BOOT:
-/* Initialize HSEEN */
-HSEEN = newHV(); if (!HSEEN) croak ("Can't initialize seen hash (HSEEN)");
-
void
clone(self, depth=-1)
SV *self
@@ -312,8 +310,10 @@
PREINIT:
SV * clone = &PL_sv_undef;
PPCODE:
+ HV *hseen = newHV();
TRACEME(("ref = 0x%x\n", self));
- clone = sv_clone(self, depth);
- hv_clear(HSEEN); /* Free HV */
+ clone = sv_clone(self, hseen, depth);
+ hv_clear(hseen); /* Free HV */
+ SvREFCNT_dec((SV *)hseen);
EXTEND(SP,1);
PUSHs(sv_2mortal(clone));
Modified: branches/upstream/libclone-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libclone-perl/current/MANIFEST?rev=28121&op=diff
==============================================================================
--- branches/upstream/libclone-perl/current/MANIFEST (original)
+++ branches/upstream/libclone-perl/current/MANIFEST Fri Dec 12 14:59:35 2008
@@ -1,4 +1,4 @@
-# $Id: MANIFEST,v 0.19 2006-10-08 03:37:20 ray Exp $
+# $Id: MANIFEST,v 0.19 2006/10/08 03:37:20 ray Exp $
Changes
Clone.pm
Clone.xs
Modified: branches/upstream/libclone-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libclone-perl/current/META.yml?rev=28121&op=diff
==============================================================================
--- branches/upstream/libclone-perl/current/META.yml (original)
+++ branches/upstream/libclone-perl/current/META.yml Fri Dec 12 14:59:35 2008
@@ -1,10 +1,10 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Clone
-version: 0.29
+version: 0.30
version_from: Clone.pm
installdirs: site
requires:
distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.30_01
+generated_by: ExtUtils::MakeMaker version 6.30
Modified: branches/upstream/libclone-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libclone-perl/current/Makefile.PL?rev=28121&op=diff
==============================================================================
--- branches/upstream/libclone-perl/current/Makefile.PL (original)
+++ branches/upstream/libclone-perl/current/Makefile.PL Fri Dec 12 14:59:35 2008
@@ -1,5 +1,5 @@
use ExtUtils::MakeMaker;
-# $Id: Makefile.PL,v 0.19 2007-10-15 04:57:20 ray Exp $
+# $Id: Makefile.PL,v 0.19 2007/10/15 04:57:20 ray Exp $
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
Modified: branches/upstream/libclone-perl/current/t/01array.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libclone-perl/current/t/01array.t?rev=28121&op=diff
==============================================================================
--- branches/upstream/libclone-perl/current/t/01array.t (original)
+++ branches/upstream/libclone-perl/current/t/01array.t Fri Dec 12 14:59:35 2008
@@ -1,4 +1,4 @@
-# $Id: 01array.t,v 0.19 2006-10-08 03:37:29 ray Exp $
+# $Id: 01array.t,v 0.19 2006/10/08 03:37:29 ray Exp $
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl test.pl'
Modified: branches/upstream/libclone-perl/current/t/02hash.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libclone-perl/current/t/02hash.t?rev=28121&op=diff
==============================================================================
--- branches/upstream/libclone-perl/current/t/02hash.t (original)
+++ branches/upstream/libclone-perl/current/t/02hash.t Fri Dec 12 14:59:35 2008
@@ -1,4 +1,4 @@
-# $Id: 02hash.t,v 0.19 2006-10-08 03:37:29 ray Exp $
+# $Id: 02hash.t,v 0.19 2006/10/08 03:37:29 ray Exp $
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl test.pl'
Modified: branches/upstream/libclone-perl/current/t/03scalar.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libclone-perl/current/t/03scalar.t?rev=28121&op=diff
==============================================================================
--- branches/upstream/libclone-perl/current/t/03scalar.t (original)
+++ branches/upstream/libclone-perl/current/t/03scalar.t Fri Dec 12 14:59:35 2008
@@ -1,4 +1,4 @@
-# $Id: 03scalar.t,v 0.19 2006-10-08 03:37:29 ray Exp $
+# $Id: 03scalar.t,v 0.19 2006/10/08 03:37:29 ray Exp $
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl test.pl'
Modified: branches/upstream/libclone-perl/current/t/04tie.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libclone-perl/current/t/04tie.t?rev=28121&op=diff
==============================================================================
--- branches/upstream/libclone-perl/current/t/04tie.t (original)
+++ branches/upstream/libclone-perl/current/t/04tie.t Fri Dec 12 14:59:35 2008
@@ -1,4 +1,4 @@
-# $Id: 04tie.t,v 0.18 2006-10-08 03:37:29 ray Exp $
+# $Id: 04tie.t,v 0.18 2006/10/08 03:37:29 ray Exp $
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl test.pl'
Modified: branches/upstream/libclone-perl/current/t/05dtype.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libclone-perl/current/t/05dtype.t?rev=28121&op=diff
==============================================================================
--- branches/upstream/libclone-perl/current/t/05dtype.t (original)
+++ branches/upstream/libclone-perl/current/t/05dtype.t Fri Dec 12 14:59:35 2008
@@ -1,4 +1,4 @@
-# $Id: 05dtype.t,v 0.18 2006-10-08 03:37:29 ray Exp $
+# $Id: 05dtype.t,v 0.18 2006/10/08 03:37:29 ray Exp $
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl test.pl'
Modified: branches/upstream/libclone-perl/current/t/06refcnt.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libclone-perl/current/t/06refcnt.t?rev=28121&op=diff
==============================================================================
--- branches/upstream/libclone-perl/current/t/06refcnt.t (original)
+++ branches/upstream/libclone-perl/current/t/06refcnt.t Fri Dec 12 14:59:35 2008
@@ -1,4 +1,4 @@
-# $Id: 06refcnt.t,v 0.22 2007-07-25 03:41:06 ray Exp $
+# $Id: 06refcnt.t,v 0.22 2007/07/25 03:41:06 ray Exp $
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl test.pl'
Modified: branches/upstream/libclone-perl/current/t/07magic.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libclone-perl/current/t/07magic.t?rev=28121&op=diff
==============================================================================
--- branches/upstream/libclone-perl/current/t/07magic.t (original)
+++ branches/upstream/libclone-perl/current/t/07magic.t Fri Dec 12 14:59:35 2008
@@ -1,4 +1,4 @@
-# $Id: 07magic.t,v 1.8 2007-04-20 05:40:48 ray Exp $
+# $Id: 07magic.t,v 1.8 2007/04/20 05:40:48 ray Exp $
use strict;
Modified: branches/upstream/libclone-perl/current/t/dclone.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libclone-perl/current/t/dclone.t?rev=28121&op=diff
==============================================================================
--- branches/upstream/libclone-perl/current/t/dclone.t (original)
+++ branches/upstream/libclone-perl/current/t/dclone.t Fri Dec 12 14:59:35 2008
@@ -1,6 +1,6 @@
#!./perl
-# $Id: dclone.t,v 0.18 2006-10-08 03:37:29 ray Exp $
+# $Id: dclone.t,v 0.18 2006/10/08 03:37:29 ray Exp $
#
# Id: dclone.t,v 0.6.1.1 2000/03/02 22:21:05 ram Exp
#
@@ -10,7 +10,7 @@
# as specified in the README file that comes with the distribution.
#
# $Log: dclone.t,v $
-# Revision 0.18 2006-10-08 03:37:29 ray
+# Revision 0.18 2006/10/08 03:37:29 ray
# Commented out VERSION causes errors with DynaLoader in perl 5.6.1 (and
# probably all earlier versions. It was removed.
#
Modified: branches/upstream/libclone-perl/current/t/tied.pl
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libclone-perl/current/t/tied.pl?rev=28121&op=diff
==============================================================================
--- branches/upstream/libclone-perl/current/t/tied.pl (original)
+++ branches/upstream/libclone-perl/current/t/tied.pl Fri Dec 12 14:59:35 2008
@@ -1,6 +1,6 @@
#!./perl
-# $Id: tied.pl,v 0.18 2006-10-08 03:37:29 ray Exp $
+# $Id: tied.pl,v 0.18 2006/10/08 03:37:29 ray Exp $
#
# Copyright (c) 1995-1998, Raphael Manfredi
#
@@ -8,7 +8,7 @@
# as specified in the README file that comes with the distribution.
#
# $Log: tied.pl,v $
-# Revision 0.18 2006-10-08 03:37:29 ray
+# Revision 0.18 2006/10/08 03:37:29 ray
# Commented out VERSION causes errors with DynaLoader in perl 5.6.1 (and
# probably all earlier versions. It was removed.
#
More information about the Pkg-perl-cvs-commits
mailing list