[Templates-cvs] cvs commit: Template2/xs Stash.xs

cvs@template-toolkit.org cvs@template-toolkit.org


cvs         07/02/09 20:27:34

  Modified:    xs       Stash.xs
  Log:
  applied the missing middle bit of Steve's Stash.xs patch
  
  Revision  Changes    Path
  1.23      +4 -10     Template2/xs/Stash.xs
  
  Index: Stash.xs
  ===================================================================
  RCS file: /template-toolkit/Template2/xs/Stash.xs,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- Stash.xs	2007/02/09 20:18:18	1.22
  +++ Stash.xs	2007/02/09 20:27:33	1.23
  @@ -26,7 +26,7 @@
   *
   *---------------------------------------------------------------------
   *
  -* $Id: Stash.xs,v 1.22 2007/02/09 20:18:18 abw Exp $
  +* $Id: Stash.xs,v 1.23 2007/02/09 20:27:33 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.22 2007/02/09 20:18:18 abw Exp $";
  +static char rcsid[]  = "$Id: Stash.xs,v 1.23 2007/02/09 20:27:33 abw Exp $";
   
   #define THROW_SIZE 64
   static char throw_fmt[] = "Can't locate object method \"%s\" via package \"%s\"";
  @@ -518,14 +518,8 @@
               
               /* avoid 'modification of read-only value' error */
               newsv = newSVsv(value); 
  -            if (hv_store(roothv, key, key_len, newsv, 0)) {
  -                /* invoke any tied magical STORE method */
  -                debug(" - stored hash item\n");
  -                SvSETMAGIC(newsv);
  -            }
  -            else {
  -                printf(" - did not store hash item (hv_store() returned NULL)\n");
  -            }
  +            hv_store(roothv, key, key_len, newsv, 0);
  +            SvSETMAGIC(newsv);
   
               return value;
               break;