You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl-cvs@perl.apache.org by ri...@apache.org on 2001/11/08 14:14:03 UTC
cvs commit: embperl/test/html/registry Execute.htm
richter 01/11/08 05:14:03
Modified: . Tag: Embperl2c DOM.xs Embperl.pm epcache.c epcomp.c
epmain.c epprovider.c test.pl
test/html/registry Tag: Embperl2c Execute.htm
Log:
Embperl 2 - cache management
Revision Changes Path
No revision
No revision
1.1.2.20 +7 -3 embperl/DOM.xs
Index: DOM.xs
===================================================================
RCS file: /home/cvs/embperl/DOM.xs,v
retrieving revision 1.1.2.19
retrieving revision 1.1.2.20
diff -u -r1.1.2.19 -r1.1.2.20
--- DOM.xs 2001/11/02 11:34:25 1.1.2.19
+++ DOM.xs 2001/11/08 13:14:02 1.1.2.20
@@ -10,7 +10,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: DOM.xs,v 1.1.2.19 2001/11/02 11:34:25 richter Exp $
+# $Id: DOM.xs,v 1.1.2.20 2001/11/08 13:14:02 richter Exp $
#
###################################################################################
@@ -324,8 +324,12 @@
CODE:
tDomTree * pDomTree = DomTree_self (xDomTree) ;
char * sAttrText = NULL ;
-
- Attr_selfValue (pDomTree, Attr_self(pDomTree, xAttr), pCurrReq -> nCurrRepeatLevel, &sAttrText) ;
+ tAttrData * pAttr ;
+
+ lprintf (pCurrReq, "xDomTree=%d, xAttr=%d pDomTree=%x\n", xDomTree, xAttr, pDomTree) ;
+
+ pAttr = Attr_self(pDomTree, xAttr) ;
+ Attr_selfValue (pDomTree, pAttr , pCurrReq -> nCurrRepeatLevel, &sAttrText) ;
RETVAL = newSVpv (sAttrText, ArrayGetSize (sAttrText)) ;
StringFree (&sAttrText) ;
OUTPUT:
1.118.4.58 +5 -5 embperl/Embperl.pm
Index: Embperl.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl.pm,v
retrieving revision 1.118.4.57
retrieving revision 1.118.4.58
diff -u -r1.118.4.57 -r1.118.4.58
--- Embperl.pm 2001/11/08 09:03:05 1.118.4.57
+++ Embperl.pm 2001/11/08 13:14:02 1.118.4.58
@@ -10,7 +10,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: Embperl.pm,v 1.118.4.57 2001/11/08 09:03:05 richter Exp $
+# $Id: Embperl.pm,v 1.118.4.58 2001/11/08 13:14:02 richter Exp $
#
###################################################################################
@@ -471,10 +471,10 @@
my $lineno = getlineno () ;
my $Inputfile = Sourcefile () ;
- #if ($msg =~ /HTML\/Embperl/)
- # {
- # $msg =~ s/at (.*?) line (\d*)/at $Inputfile in block starting at line $lineno/ ;
- # }
+ if ($msg =~ /HTML\/Embperl/)
+ {
+ $msg =~ s/at (.*?) line (\d*)/at $Inputfile in block starting at line $lineno/ ;
+ }
logerror (rcPerlWarn, $msg);
}
1.1.2.9 +2 -3 embperl/Attic/epcache.c
Index: epcache.c
===================================================================
RCS file: /home/cvs/embperl/Attic/epcache.c,v
retrieving revision 1.1.2.8
retrieving revision 1.1.2.9
diff -u -r1.1.2.8 -r1.1.2.9
--- epcache.c 2001/11/08 09:03:05 1.1.2.8
+++ epcache.c 2001/11/08 13:14:02 1.1.2.9
@@ -9,7 +9,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: epcache.c,v 1.1.2.8 2001/11/08 09:03:05 richter Exp $
+# $Id: epcache.c,v 1.1.2.9 2001/11/08 13:14:02 richter Exp $
#
###################################################################################*/
@@ -200,7 +200,7 @@
strncpy (r -> errdat1, sProvider, sizeof(r -> errdat1) - 1) ;
return rcUnknownProvider ;
}
- pKey = newSVpv (sProvider, 0) ;
+ pKey = newSVpv ("", 0) ;
if (pProviderClass -> fAppendKey)
if ((rc = (*pProviderClass -> fAppendKey)(r, pProviderClass, pProviderParam, pKey)) != ok)
return rc ;
@@ -328,7 +328,6 @@
strncpy (r -> errdat1, sProvider, sizeof(r -> errdat1) - 1) ;
return rcUnknownProvider ;
}
- sv_catpvf (pKey, "-%s", sProvider) ;
if (pProviderClass -> fAppendKey)
if ((rc = (*pProviderClass -> fAppendKey)(r, pProviderClass, pProviderParam, pKey)) != ok)
return rc ;
1.4.2.70 +45 -43 embperl/Attic/epcomp.c
Index: epcomp.c
===================================================================
RCS file: /home/cvs/embperl/Attic/epcomp.c,v
retrieving revision 1.4.2.69
retrieving revision 1.4.2.70
diff -u -r1.4.2.69 -r1.4.2.70
--- epcomp.c 2001/11/07 15:21:59 1.4.2.69
+++ epcomp.c 2001/11/08 13:14:02 1.4.2.70
@@ -9,7 +9,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: epcomp.c,v 1.4.2.69 2001/11/07 15:21:59 richter Exp $
+# $Id: epcomp.c,v 1.4.2.70 2001/11/08 13:14:02 richter Exp $
#
###################################################################################*/
@@ -969,8 +969,8 @@
int i = l ;
char *p = pCTCode ;
- if (pCurrReq -> bDebug & dbgCompile)
- lprintf (pCurrReq, "[%d]EPCOMP: #%d L%d CompileTimeCode: %*.*s\n", pCurrReq -> nPid, pNode -> xNdx, pNode -> nLinenumber, l, l, pCTCode) ;
+ if (r -> bDebug & dbgCompile)
+ lprintf (r, "[%d]EPCOMP: #%d L%d CompileTimeCode: %*.*s\n", r -> nPid, pNode -> xNdx, pNode -> nLinenumber, l, l, pCTCode) ;
while (i--)
{ /* keep everything on one line, to make linenumbers correct */
@@ -981,7 +981,7 @@
pSV = newSVpvf("package %s ;\n#line %d \"%s\"\n%*.*s",
- pCurrReq -> Buf.sEvalPackage, pNode -> nLinenumber, sSourcefile, l,l, pCTCode) ;
+ r -> Buf.sEvalPackage, pNode -> nLinenumber, sSourcefile, l,l, pCTCode) ;
args[0] = r -> pReqSV ;
if (pCode)
{
@@ -989,7 +989,8 @@
}
else
r -> pCodeSV = &sv_undef ;
- if ((rc = EvalDirect (r, pSV, 1, args)) != ok)
+ SvTAINTED_off (pSV) ;
+ if ((rc = EvalDirect (r, pSV, 1, args)) != ok)
LogError (r, rc) ;
SvREFCNT_dec(pSV);
}
@@ -1003,15 +1004,15 @@
char * p = SvPV (r -> pCodeSV, l) ;
StringAdd (r -> pProg, p, l ) ;
StringAdd (r -> pProg, "\n", 1) ;
- if (pCurrReq -> bDebug & dbgCompile)
- lprintf (pCurrReq, "[%d]EPCOMP: #%d L%d Code: %s\n", pCurrReq -> nPid, pNode -> xNdx, pNode -> nLinenumber, p) ;
+ if (r -> bDebug & dbgCompile)
+ lprintf (r, "[%d]EPCOMP: #%d L%d Code: %s\n", r -> nPid, pNode -> xNdx, pNode -> nLinenumber, p) ;
}
else if (pCode)
{
StringAdd (r -> pProg, pCode, nCodeLen ) ;
StringAdd (r -> pProg, "\n", 1) ;
- if (pCurrReq -> bDebug & dbgCompile)
- lprintf (pCurrReq, "[%d]EPCOMP: #%d L%d Code: %*.*s\n", pCurrReq -> nPid, pNode -> xNdx, pNode -> nLinenumber, nCodeLen, nCodeLen, pCode) ;
+ if (r -> bDebug & dbgCompile)
+ lprintf (r, "[%d]EPCOMP: #%d L%d Code: %*.*s\n", r -> nPid, pNode -> xNdx, pNode -> nLinenumber, nCodeLen, nCodeLen, pCode) ;
}
StringFree (&pCode) ;
@@ -1058,8 +1059,8 @@
if (embperl_CompileToPerlCode (pDomTree, pNode, pCmd -> sMayJump, &sStackValue))
{
*bCheckpointPending = -1 ;
- if (pCurrReq -> bDebug & dbgCompile)
- lprintf (pCurrReq, "[%d]EPCOMP: #%d L%d Set Checkpoint pending\n", pCurrReq -> nPid, pNode -> xNdx, pNode -> nLinenumber) ;
+ if (r -> bDebug & dbgCompile)
+ lprintf (r, "[%d]EPCOMP: #%d L%d Set Checkpoint pending\n", r -> nPid, pNode -> xNdx, pNode -> nLinenumber) ;
}
if (pCmd -> bRemoveNode & 1)
@@ -1090,8 +1091,8 @@
{
(*r -> pProg)[nCheckpointCodeOffset] = '#' ;
nCheckpointArrayOffset = ArraySub (&pDomTree -> pCheckpoints, 1) ;
- if (pCurrReq -> bDebug & dbgCompile)
- lprintf (pCurrReq, "[%d]EPCOMP: #%d L%d Remove Checkpoint\n", pCurrReq -> nPid, pNode -> xNdx, pNode -> nLinenumber) ;
+ if (r -> bDebug & dbgCompile)
+ lprintf (r, "[%d]EPCOMP: #%d L%d Remove Checkpoint\n", r -> nPid, pNode -> xNdx, pNode -> nLinenumber) ;
nCheckpointCodeOffset = 0 ;
*bCheckpointPending = -1 ; /* set checkpoint on next possibility */
}
@@ -1107,8 +1108,8 @@
l = sprintf (buf, " _ep_cp(%d) ;\n", nCheckpointArrayOffset) ;
nCheckpointCodeOffset = StringAdd (r -> pProg, buf, l) ;
- if (pCurrReq -> bDebug & dbgCompile)
- lprintf (pCurrReq, "[%d]EPCOMP: #%d L%d Checkpoint\n", pCurrReq -> nPid, pNode -> xNdx, pNode -> nLinenumber) ;
+ if (r -> bDebug & dbgCompile)
+ lprintf (r, "[%d]EPCOMP: #%d L%d Checkpoint\n", r -> nPid, pNode -> xNdx, pNode -> nLinenumber) ;
}
@@ -1200,8 +1201,8 @@
Ndx2StringLen (pDomTree -> xFilename, sSourcefile, nSourcefile) ;
- if (pCurrReq -> bDebug & dbgCompile)
- lprintf (pCurrReq, "[%d]EPCOMP: #%d L%d CompileTimeCodeEnd: %*.*s\n", pCurrReq -> nPid, pNode -> xNdx, pNode -> nLinenumber, l, l, pCTCode) ;
+ if (r -> bDebug & dbgCompile)
+ lprintf (r, "[%d]EPCOMP: #%d L%d CompileTimeCodeEnd: %*.*s\n", r -> nPid, pNode -> xNdx, pNode -> nLinenumber, l, l, pCTCode) ;
while (i--)
{ /* keep everything on one line, to make linenumbers correct */
@@ -1213,7 +1214,7 @@
pSV = newSVpvf("package %s ;\n#line %d \"%s\"\n%*.*s",
- pCurrReq -> Buf.sEvalPackage, pNode -> nLinenumber, sSourcefile, l,l, pCTCode) ;
+ r -> Buf.sEvalPackage, pNode -> nLinenumber, sSourcefile, l,l, pCTCode) ;
args[0] = r -> pReqSV ;
if (pCode)
{
@@ -1236,8 +1237,8 @@
{
StringAdd (r -> pProg, p, nCodeLen ) ;
StringAdd (r -> pProg, "\n", 1) ;
- if (pCurrReq -> bDebug & dbgCompile)
- lprintf (pCurrReq, "[%d]EPCOMP: #%d L%d CodeEnd: %s\n", pCurrReq -> nPid, pNode -> xNdx, pNode -> nLinenumber, p) ;
+ if (r -> bDebug & dbgCompile)
+ lprintf (r, "[%d]EPCOMP: #%d L%d CodeEnd: %s\n", r -> nPid, pNode -> xNdx, pNode -> nLinenumber, p) ;
}
}
}
@@ -1245,24 +1246,24 @@
{
StringAdd (r -> pProg, pCode, nCodeLen ) ;
StringAdd (r -> pProg, "\n", 1) ;
- if (pCurrReq -> bDebug & dbgCompile)
- lprintf (pCurrReq, "[%d]EPCOMP: #%d L%d CodeEnd: %*.*s\n", pCurrReq -> nPid, pNode -> xNdx, pNode -> nLinenumber, nCodeLen, nCodeLen, pCode) ;
+ if (r -> bDebug & dbgCompile)
+ lprintf (r, "[%d]EPCOMP: #%d L%d CodeEnd: %*.*s\n", r -> nPid, pNode -> xNdx, pNode -> nLinenumber, nCodeLen, nCodeLen, pCode) ;
}
if (nCodeLen == 0)
{
if (pCmd -> bPerlCodeRemove && nStartCodeOffset)
{
(*r -> pProg)[nStartCodeOffset] = '#' ;
- if (pCurrReq -> bDebug & dbgCompile)
- lprintf (pCurrReq, "[%d]EPCOMP: #%d L%d Remove Codeblock\n", pCurrReq -> nPid, pNode -> xNdx, pNode -> nLinenumber) ;
+ if (r -> bDebug & dbgCompile)
+ lprintf (r, "[%d]EPCOMP: #%d L%d Remove Codeblock\n", r -> nPid, pNode -> xNdx, pNode -> nLinenumber) ;
}
}
if (pCmd -> sPerlCodeEnd && pCmd -> sMayJump)
if (embperl_CompileToPerlCode (pDomTree, pNode, pCmd -> sMayJump, &sStackValue))
{
*bCheckpointPending = -1 ;
- if (pCurrReq -> bDebug & dbgCompile)
- lprintf (pCurrReq, "[%d]EPCOMP: #%d L%d Set Checkpoint pending\n", pCurrReq -> nPid, pNode -> xNdx, pNode -> nLinenumber) ;
+ if (r -> bDebug & dbgCompile)
+ lprintf (r, "[%d]EPCOMP: #%d L%d Set Checkpoint pending\n", r -> nPid, pNode -> xNdx, pNode -> nLinenumber) ;
}
if (pCmd -> sStackName && (pNode -> nType == ntypStartTag || pNode -> nType == ntypDocument || pNode -> nType == ntypDocumentFraq))
{
@@ -1285,8 +1286,8 @@
{
r -> pProg = &r -> pProgRun ;
*bCheckpointPending = -1 ;
- if (pCurrReq -> bDebug & dbgCompile)
- lprintf (pCurrReq, "[%d]EPCOMP: #%d L%d Set Checkpoint pending (switch to ProgRun)\n", pCurrReq -> nPid, pNode -> xNdx, pNode -> nLinenumber) ;
+ if (r -> bDebug & dbgCompile)
+ lprintf (r, "[%d]EPCOMP: #%d L%d Set Checkpoint pending (switch to ProgRun)\n", r -> nPid, pNode -> xNdx, pNode -> nLinenumber) ;
}
}
@@ -1349,11 +1350,11 @@
pCmd = pCmdHead = NULL ;
- if (pCurrReq -> bDebug & dbgCompile)
+ if (r -> bDebug & dbgCompile)
{
char buf[20] ;
- lprintf (pCurrReq, "[%d]EPCOMP: #%d L%d -------> parent=%d node=%d type=%d text=%s (#%d,%s) %s\n",
- pCurrReq -> nPid, pNode -> xNdx, pNode -> nLinenumber,
+ lprintf (r, "[%d]EPCOMP: #%d L%d -------> parent=%d node=%d type=%d text=%s (#%d,%s) %s\n",
+ r -> nPid, pNode -> xNdx, pNode -> nLinenumber,
Node_parentNode (pDomTree, pNode -> xNdx, 0), pNode -> xNdx,
pNode -> nType, Node_selfNodeName(pNode), nNdx, pCmd?"compile":"-", (pCmd && pCmd -> bRemoveNode)?(sprintf (buf, "removenode=%d", pCmd -> bRemoveNode), buf):"") ;
}
@@ -1375,8 +1376,8 @@
l = sprintf (buf, " _ep_cp(%d) ;\n", nCheckpointArrayOffset) ;
nCheckpointCodeOffset = StringAdd (r -> pProg, buf, l) ;
- if (pCurrReq -> bDebug & dbgCompile)
- lprintf (pCurrReq, "[%d]EPCOMP: #%d L%d Checkpoint\n", pCurrReq -> nPid, pNode -> xNdx, pNode -> nLinenumber) ;
+ if (r -> bDebug & dbgCompile)
+ lprintf (r, "[%d]EPCOMP: #%d L%d Checkpoint\n", r -> nPid, pNode -> xNdx, pNode -> nLinenumber) ;
}
@@ -1496,8 +1497,8 @@
l = sprintf (buf, " _ep_cp(%d) ;\n", nCheckpointArrayOffset) ;
StringAdd (r -> pProg, buf, l) ;
- if (pCurrReq -> bDebug & dbgCompile)
- lprintf (pCurrReq, "[%d]EPCOMP: #%d Checkpoint\n", pCurrReq -> nPid, -1) ;
+ if (r -> bDebug & dbgCompile)
+ lprintf (r, "[%d]EPCOMP: #%d Checkpoint\n", r -> nPid, -1) ;
}
@@ -1579,7 +1580,7 @@
r -> nPhase = phRunAfterCompile ;
l = ArrayGetSize (r -> pProgDef) ;
- if (l && pCurrReq -> bDebug & dbgCompile)
+ if (l && r -> bDebug & dbgCompile)
lprintf (r, "[%d]EPCOMP: AfterCompileTimeCode: %*.*s\n", r -> nPid, l, l, r -> pProgDef) ;
/* pSV = newSVpvf("package %s ; \nmy ($_ep_req, $_ep_DomTree) = @_;\n%*.*s", r -> Buf.sEvalPackage, l,l, r -> pProgDef) ; */
@@ -1674,6 +1675,7 @@
clock_t cl2 ;
SV * pSV ;
+ tainted = 0 ;
r -> xCurrDomTree = xSrcDomTree ;
if (!r -> bError)
@@ -1915,7 +1917,7 @@
r -> nPhase = phRunAfterCompile ;
l = ArrayGetSize (r -> pProgDef) ;
- if (l && pCurrReq -> bDebug & dbgCompile)
+ if (l && r -> bDebug & dbgCompile)
lprintf (r, "[%d]EPCOMP: AfterCompileTimeCode: %*.*s\n", r -> nPid, l, l, r -> pProgDef) ;
/* pSV = newSVpvf("package %s ; \nmy ($_ep_req, $_ep_DomTree) = @_;\n%*.*s", r -> Buf.sEvalPackage, l,l, r -> pProgDef) ; */
@@ -2081,8 +2083,8 @@
av_push (pSaveAV, newSViv (r -> xCurrNode)) ;
av_push (pSaveAV, newSViv (ArrayGetSize (DomTree_self (xOrgDomTree) -> pOrder))) ;
- if (pCurrReq -> bDebug & dbgCompile)
- lprintf (pCurrReq, "[%d]SUB: Enter from DomTree=%d into DomTree=%d, Source DomTree=%d \n", pCurrReq -> nPid, r -> xCurrDomTree, xOrgDomTree, xDomTree) ;
+ if (r -> bDebug & dbgCompile)
+ lprintf (r, "[%d]SUB: Enter from DomTree=%d into DomTree=%d, Source DomTree=%d \n", r -> nPid, r -> xCurrDomTree, xOrgDomTree, xDomTree) ;
return r -> xCurrDomTree = xOrgDomTree ;*/ /* DomTree already cloned */
}
#endif
@@ -2108,8 +2110,8 @@
sv_setiv (pDomTreeSV, r -> xCurrDomTree) ;
- if (pCurrReq -> bDebug & dbgRun)
- lprintf (pCurrReq, "[%d]SUB: Enter from DomTree=%d into new DomTree=%d, Source DomTree=%d (org=%d)\n", pCurrReq -> nPid, xOldDomTree, r -> xCurrDomTree, xDomTree, xOrgDomTree) ;
+ if (r -> bDebug & dbgRun)
+ lprintf (r, "[%d]SUB: Enter from DomTree=%d into new DomTree=%d, Source DomTree=%d (org=%d)\n", r -> nPid, xOldDomTree, r -> xCurrDomTree, xDomTree, xOrgDomTree) ;
return r -> xCurrDomTree ;
}
@@ -2152,8 +2154,8 @@
/* Element_selfSetAttribut (pCallerDomTree, Node_self (pCallerDomTree, xDocFraq), NULL, xOrderIndexAttr, NULL, nOrderNdx, 0) ; */
- if (pCurrReq -> bDebug & dbgRun)
- lprintf (pCurrReq, "[%d]SUB: Leave from DomTree=%d back to DomTree=%d\n", pCurrReq -> nPid, xSubDomTree, r -> xCurrDomTree) ;
+ if (r -> bDebug & dbgRun)
+ lprintf (r, "[%d]SUB: Leave from DomTree=%d back to DomTree=%d\n", r -> nPid, xSubDomTree, r -> xCurrDomTree) ;
return ok ;
}
1.75.4.59 +2 -1 embperl/epmain.c
Index: epmain.c
===================================================================
RCS file: /home/cvs/embperl/epmain.c,v
retrieving revision 1.75.4.58
retrieving revision 1.75.4.59
diff -u -r1.75.4.58 -r1.75.4.59
--- epmain.c 2001/11/08 09:03:05 1.75.4.58
+++ epmain.c 2001/11/08 13:14:02 1.75.4.59
@@ -10,7 +10,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: epmain.c,v 1.75.4.58 2001/11/08 09:03:05 richter Exp $
+# $Id: epmain.c,v 1.75.4.59 2001/11/08 13:14:02 richter Exp $
#
###################################################################################*/
@@ -3397,6 +3397,7 @@
"cache", hashtint, 0,
"provider", hashtsv, CreateHashRef (
"type", hashtstr, "epparse",
+ "syntax", hashtstr, r -> pTokenTable -> sName,
"source", hashtsv, CreateHashRef (
"cache", hashtint, 0,
"provider", hashtsv, pSrc,
1.1.2.5 +39 -11 embperl/Attic/epprovider.c
Index: epprovider.c
===================================================================
RCS file: /home/cvs/embperl/Attic/epprovider.c,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -r1.1.2.4 -r1.1.2.5
--- epprovider.c 2001/11/08 09:03:05 1.1.2.4
+++ epprovider.c 2001/11/08 13:14:02 1.1.2.5
@@ -9,7 +9,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: epprovider.c,v 1.1.2.4 2001/11/08 09:03:05 richter Exp $
+# $Id: epprovider.c,v 1.1.2.5 2001/11/08 13:14:02 richter Exp $
#
###################################################################################*/
@@ -300,7 +300,7 @@
sDir = r -> sCWD ;
}
- sv_catpvf (pKey, ":%s%s%s", sDir, *sDir?"/":"", sFilename) ;
+ sv_catpvf (pKey, "*file:%s%s%s", sDir, *sDir?"/":"", sFilename) ;
return ok ;
}
@@ -430,8 +430,9 @@
pNew -> sName = GetHashValueStrDup (pParam, "name", NULL) ;
pNew -> pSource = GetHashValueSVinc (pParam, "source", NULL) ;
- pNew -> nLastModified = GetHashValueInt (pParam, "mtime", NULL) ;
+ pNew -> nLastModified = GetHashValueUInt (pParam, "mtime", 0) ;
+ lprintf (r, "mem_new provider=%x source=%x\n", pNew, pNew -> pSource) ;
return ok ;
}
@@ -478,18 +479,21 @@
STRLEN l ;
tCacheItem * pItem ;
const char * sName = GetHashValueStr (pParam, "name", "") ;
- sv_catpvf (pKey, ":%s", sName) ;
+ sv_catpvf (pKey, "*memory:%s", sName) ;
+ lprintf (r, "mem_ak key=%s\n", SvPV(pKey, l)) ;
+
if (pItem = Cache_GetByKey (r, SvPV(pKey, l)))
{
tProviderMem * pProvider = (tProviderMem *)(pItem -> pProvider) ;
+ lprintf (r, "mem_ak provider=%x source=%x\n", pProvider, pProvider -> pSource) ;
/* update provider data */
if (pProvider -> pSource)
SvREFCNT_dec (pProvider -> pSource) ;
pProvider -> pSource = GetHashValueSVinc (pParam, "source", NULL) ;
- pProvider -> nLastModified = GetHashValueInt (pParam, "mtime", NULL) ;
+ pProvider -> nLastModified = GetHashValueUInt (pParam, "mtime", 0) ;
}
@@ -719,7 +723,14 @@
/*in*/ HV * pParam,
/*i/o*/ SV * pKey)
{
- return Cache_AppendKey (r, pParam, "source", pKey) ;
+ int rc ;
+ const char * sSyntax = GetHashValueStr (pParam, "syntax", "") ;
+
+ if ((rc = Cache_AppendKey (r, pParam, "source", pKey)) != ok)
+ return rc;
+
+ sv_catpvf (pKey, "*epparse:%s", sSyntax) ;
+ return ok ;
}
@@ -927,7 +938,13 @@
/*in*/ HV * pParam,
/*i/o*/ SV * pKey)
{
- return Cache_AppendKey (r, pParam, "source", pKey) ;
+ int rc ;
+
+ if ((rc = Cache_AppendKey (r, pParam, "source", pKey)) != ok)
+ return rc;
+
+ sv_catpv (pKey, "*epcompile") ;
+ return ok ;
}
@@ -980,6 +997,8 @@
if ((rc = embperl_Compile (r, xSrcDomTree, pData, &((tProviderEpCompile *)pProvider) -> pSVData)) != ok)
return rc ;
+
+
return ok ;
}
@@ -1019,7 +1038,7 @@
/*in*/ SV * * pData)
{
- *pData = ((tProviderEpCompile *)pProvider) -> pSVData ;
+ *pData = SvREFCNT_inc (((tProviderEpCompile *)pProvider) -> pSVData) ;
return ok ;
}
@@ -1185,8 +1204,11 @@
int bKeyOptions = GetHashValueInt (pParam, "cache_key_options", 15) ;
CV * pKeyCV ;
- sv_catpv (pKey, ":") ;
+ if ((rc = Cache_AppendKey (r, pParam, "source", pKey)) != ok)
+ return rc;
+ sv_catpv (pKey, "*eprun:") ;
+
if ((rc = GetHashValueCREF (r, pParam, "cache_key_func", &pKeyCV)) != ok)
return rc ;
@@ -1207,7 +1229,7 @@
if ((bKeyOptions & ckoptQueryInfo) && r -> sQueryInfo)
sv_catpv (pKey, r -> sQueryInfo) ;
- return Cache_AppendKey (r, pParam, "source", pKey) ;
+ return ok ;
}
@@ -1418,7 +1440,13 @@
/*in*/ HV * pParam,
/*i/o*/ SV * pKey)
{
- return Cache_AppendKey (r, pParam, "source", pKey) ;
+ int rc ;
+
+ if ((rc = Cache_AppendKey (r, pParam, "source", pKey)) != ok)
+ return rc;
+
+ sv_catpv (pKey, "*eptostring") ;
+ return ok ;
}
1.70.4.88 +14 -2 embperl/test.pl
Index: test.pl
===================================================================
RCS file: /home/cvs/embperl/test.pl,v
retrieving revision 1.70.4.87
retrieving revision 1.70.4.88
diff -u -r1.70.4.87 -r1.70.4.88
--- test.pl 2001/11/08 09:03:05 1.70.4.87
+++ test.pl 2001/11/08 13:14:03 1.70.4.88
@@ -1,6 +1,5 @@
#!/usr/bin/perl --
-
###################################################################################
#
# Embperl - Copyright (c) 1997-2001 Gerald Richter / ECOS
@@ -12,7 +11,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: test.pl,v 1.70.4.87 2001/11/08 09:03:05 richter Exp $
+# $Id: test.pl,v 1.70.4.88 2001/11/08 13:14:03 richter Exp $
#
###################################################################################
@@ -123,7 +122,20 @@
'errors' => -1,
'noloop' => 1,
'condition' => '$] < 5.006000',
+ offline => 1,
},
+# 'varerr.htm' => {
+# 'errors' => 8,
+# 'noloop' => 1,
+# 'condition' => '$] < 5.006000',
+# cgi => 1,
+# },
+# 'varerr.htm' => {
+# 'errors' => 8,
+# 'noloop' => 1,
+# 'condition' => '$] < 5.006000',
+# modperl => 1,
+# },
'varerr.htm' => {
'errors' => 7,
'noloop' => 1,
No revision
No revision
1.1.2.1.6.4 +3 -2 embperl/test/html/registry/Execute.htm
Index: Execute.htm
===================================================================
RCS file: /home/cvs/embperl/test/html/registry/Execute.htm,v
retrieving revision 1.1.2.1.6.3
retrieving revision 1.1.2.1.6.4
diff -u -r1.1.2.1.6.3 -r1.1.2.1.6.4
--- Execute.htm 2001/05/29 06:14:51 1.1.2.1.6.3
+++ Execute.htm 2001/11/08 13:14:03 1.1.2.1.6.4
@@ -17,7 +17,7 @@
chdir(dirname ($fn)) ;
-$HTML::Embperl::DebugDefault = 811005 ;
+$HTML::Embperl::DebugDefault = 0xffffdffd ;
$tst1 = '<P>Here is some text</P>' ;
@@ -72,7 +72,8 @@
HTML::Embperl::Execute ({input => \'<P>Use @param to transfer some data ([+ "@param" +]) !</P>',
inputfile => 'Param',
- req_rec => $r,
+ debug => 0xffffdffd,
+ req_rec => $r,
param => [1, 2, 3, 4] }
) ;
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-cvs-help@perl.apache.org