~ubuntu-branches/debian/sid/libembperl-perl/sid

« back to all changes in this revision

Viewing changes to epcomp.c

  • Committer: Bazaar Package Importer
  • Author(s): Angus Lees
  • Date: 2005-04-20 19:25:44 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 hoary)
  • Revision ID: james.westby@ubuntu.com-20050420192544-dcp6nkxni4puc6h6
Tags: 2.0rc3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
#   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
10
10
#   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11
11
#
12
 
#   $Id: epcomp.c,v 1.13 2004/02/07 13:41:22 richter Exp $
 
12
#   $Id: epcomp.c,v 1.19 2005/02/25 08:42:00 richter Exp $
13
13
#
14
14
###################################################################################*/
15
15
 
487
487
 
488
488
    ppSV = hv_fetch((HV *)(pDomTree -> pSV), (char *)sStackName, strlen (sStackName), 0) ;  
489
489
    if (ppSV == NULL || *ppSV == NULL || SvTYPE (*ppSV) != SVt_RV)
 
490
        {
 
491
        strcpy (r -> errdat1, "CompileMatchStack") ;
 
492
        strncat (r -> errdat1, (char *)sStackName, sizeof (r -> errdat1) - 20) ;
490
493
        return rcHashError ;
491
 
 
 
494
        }
 
495
        
492
496
    pSV = av_pop ((AV *)SvRV (*ppSV)) ;
493
497
 
494
498
    s = SvPV (pSV, l) ;
676
680
        {
677
681
        if (pChildNode -> bFlags & aflgAttrChilds)
678
682
            {
679
 
            int l = sprintf (buf, "XML::Embperl::DOM::Attr::iValue ($_ep_DomTree,%ld)", pChildNode -> xNdx) ;
 
683
            sprintf (buf, "XML::Embperl::DOM::Attr::iValue ($_ep_DomTree,%ld)", pChildNode -> xNdx) ;
680
684
            sText = buf ;
681
685
            if (out == 2)
682
686
                out = 1 ;
943
947
    int             nSourcefile ;
944
948
    int i ;
945
949
    SV *        args[4] ;
946
 
    int nCodeLen  = 0 ;
 
950
    int nCodeLen = 0 ;
947
951
    int found = 0 ;
948
952
 
949
953
    r -> Component.pCodeSV = NULL ;
1660
1664
        return rc ;
1661
1665
        }
1662
1666
 
 
1667
    pDomTree = DomTree_self (xDomTree) ; /* addr may have changed */
 
1668
 
1663
1669
    SvREFCNT_dec (pDomTree -> pSV) ;
1664
1670
    pDomTree -> pSV = NULL ;
1665
1671
 
1876
1882
    {
1877
1883
    epTHX_
1878
1884
    int     rc  = ok ;
1879
 
    /* char *  sSourcefile = DomTree_filename (xSrcDomTree)  ;*/
1880
 
    char *  sSourcefile = r -> Component.sSourcefile  ;
 
1885
    /* char *  sSourcefile = r -> Component.sSourcefile  ; */
1881
1886
    
1882
1887
    tainted         = 0 ;
1883
1888
 
1900
1905
            gv = *((GV **)hv_fetch    (pStash, "param", 5, 0)) ;
1901
1906
            /* gv = r -> pThread -> pParamArrayGV ; */
1902
1907
            save_ary (gv) ;
 
1908
            SvREFCNT_dec((SV *)GvAV(gv)) ;
1903
1909
            GvAV(gv) = (AV *)SvREFCNT_inc(c -> Param.pParam) ;
1904
1910
            }
1905
1911
    
1908
1914
            gv = *((GV **)hv_fetch    (pStash, "fdat", 4, 0)) ;
1909
1915
            /* gv = r -> pThread -> pFormHashGV ; */
1910
1916
            save_hash (gv) ;
 
1917
            SvREFCNT_dec((SV *)GvHV(gv)) ;
1911
1918
            GvHV(gv) = (HV *)SvREFCNT_inc(c -> Param.pFormHash) ;
1912
1919
            }
1913
1920
 
1916
1923
            gv = *((GV **)hv_fetch    (pStash, "ffld", 4, 0)) ;
1917
1924
            /* gv = r -> pThread -> pFormArrayGV ; */
1918
1925
            save_ary (gv) ;
 
1926
            SvREFCNT_dec((SV *)GvAV(gv)) ;
1919
1927
            if (c -> Param.pFormArray)
1920
1928
                GvAV(gv) = (AV *)SvREFCNT_inc(c -> Param.pFormArray) ;
1921
1929
            else
1922
1930
                {
 
1931
                /* SVREFCNT_dec (pAV) is done by LEAVE, because of save_ary above (you can savely ignore dmalloc logged error) */
1923
1932
                AV * pAV = newAV ();
1924
1933
                HE *   pEntry ;
1925
1934
                char * pKey ;
1992
2001
    tDomTree * pDomTree ;
1993
2002
    tDomTree * pCurrDomTree ;
1994
2003
 
 
2004
    if (!r || !r -> Component.bReqRunning)
 
2005
        {
 
2006
        LogErrorParam (r -> pApp, rcSubCallNotRequest, "", "") ;
 
2007
        return 0 ;
 
2008
        }
 
2009
 
1995
2010
 #if 0
1996
2011
    if (SvIOK (pDomTreeSV))
1997
2012
        if (xOrgDomTree = SvIVX (pDomTreeSV))