[Templates-cvs] cvs commit: Template2/xs Stash.xs
cvs@template-toolkit.org
cvs@template-toolkit.org
cvs 07/02/09 20:18:19
Modified: xs Stash.xs
Log:
applied patch from Steve Peters to allow Stash.xs to compiled with bleadperl 5.9.x
Revision Changes Path
1.22 +5 -5 Template2/xs/Stash.xs
Index: Stash.xs
===================================================================
RCS file: /template-toolkit/Template2/xs/Stash.xs,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- Stash.xs 2006/05/14 08:40:42 1.21
+++ Stash.xs 2007/02/09 20:18:18 1.22
@@ -26,7 +26,7 @@
*
*---------------------------------------------------------------------
*
-* $Id: Stash.xs,v 1.21 2006/05/14 08:40:42 abw Exp $
+* $Id: Stash.xs,v 1.22 2007/02/09 20:18:18 abw Exp $
*
*=====================================================================*/
@@ -91,7 +91,7 @@
static SV* scalar_dot_defined(pTHX_ SV*, AV*);
static SV* scalar_dot_length(pTHX_ SV*, AV*);
-static char rcsid[] = "$Id: Stash.xs,v 1.21 2006/05/14 08:40:42 abw Exp $";
+static char rcsid[] = "$Id: Stash.xs,v 1.22 2007/02/09 20:18:18 abw Exp $";
#define THROW_SIZE 64
static char throw_fmt[] = "Can't locate object method \"%s\" via package \"%s\"";
@@ -497,9 +497,9 @@
return fold_results(aTHX_ count);
}
}
-
+
/* drop-through if not an object or method not found */
- switch SvTYPE(SvRV(root)) {
+ switch (SvTYPE(SvRV(root))) {
case SVt_PVHV: /* HASH */
roothv = (HV *) SvRV(root);
@@ -991,7 +991,7 @@
STRLEN jlen;
char *joint;
- if ((svp = av_fetch(args, 0, FALSE)) != NULL) {
+ if (args && (svp = av_fetch(args, 0, FALSE)) != NULL) {
joint = SvPV(*svp, jlen);
} else {
joint = " ";