dbertoni    01/01/18 10:51:00

  Modified:    c/src/XPath XPathProcessorImpl.cpp
  Log:
  Fixed bug in LocationPathPattern().  Changed intialization of args vector.
  
  Revision  Changes    Path
  1.29      +8 -21     xml-xalan/c/src/XPath/XPathProcessorImpl.cpp
  
  Index: XPathProcessorImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XPathProcessorImpl.cpp,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- XPathProcessorImpl.cpp    2001/01/08 18:28:25     1.28
  +++ XPathProcessorImpl.cpp    2001/01/18 18:50:59     1.29
  @@ -1741,10 +1741,8 @@
        {
                const int       newOpPos = m_expression->opCodeMapLength();
   
  -             XPathExpression::OpCodeMapValueVectorType       theArgs(1, 0);
  -
                // Tell how long the step is without the predicate
  -             theArgs[0] = 4;
  +             const XPathExpression::OpCodeMapValueVectorType         
theArgs(1, 4);
   
                m_expression->appendOpCode(XPathExpression::eFROM_ROOT,
                                                                   theArgs);
  @@ -1799,11 +1797,8 @@
                {
                        error("'..[predicate]' or '.[predicate]' is illegal 
syntax.  Use 'self::node()[predicate]' instead.");
                }
  -
  -             XPathExpression::OpCodeMapValueVectorType       theArgs(1, 0);
   
  -             // Tell how long the step is without the predicate
  -             theArgs[0] = 4;
  +             const XPathExpression::OpCodeMapValueVectorType         
theArgs(1, 4);
   
                m_expression->appendOpCode(XPathExpression::eFROM_SELF,
                                                                   theArgs);
  @@ -1814,10 +1809,8 @@
        {
                nextToken();
   
  -             XPathExpression::OpCodeMapValueVectorType       theArgs(1, 0);
  -
                // Tell how long the step is without the predicate
  -             theArgs[0] = 4;
  +             const XPathExpression::OpCodeMapValueVectorType         
theArgs(1, 4);
   
                m_expression->appendOpCode(XPathExpression::eFROM_PARENT,
                                                                   theArgs);
  @@ -1876,10 +1869,8 @@
                // by a regular step pattern.
                // if(lookahead(XalanUnicode::charCommercialAt, 1) == true || 
lookahead("::", 2) == true)
                {
  -                     XPathExpression::OpCodeMapValueVectorType       
theArgs(1, 0);
  -
                        // Tell how long the step is without the predicate
  -                     theArgs[0] = 4;
  +                     const XPathExpression::OpCodeMapValueVectorType         
theArgs(1, 4);
   
                        
m_expression->appendOpCode(XPathExpression::eFROM_DESCENDANTS_OR_SELF,
                                                                           
theArgs);
  @@ -2189,8 +2180,8 @@
        // These token s_functionKeyString should not be here, as it is really
        // part of the XSLT standard, and not the XPATH standard.
        if(lookahead(XalanUnicode::charLeftParenthesis, 1) == true &&
  -                                     tokenIs(s_functionIDString) == true ||
  -                               tokenIs(s_functionKeyString) == true)
  +                             (tokenIs(s_functionIDString) == true ||
  +                              tokenIs(s_functionKeyString) == true))
        {
                IdKeyPattern();
   
  @@ -2198,10 +2189,8 @@
                {
                        const int       newOpPos = 
m_expression->opCodeMapLength();
   
  -                     XPathExpression::OpCodeMapValueVectorType       
theArgs(1, 0);
  -
                        // Tell how long the step is without the predicate
  -                     theArgs[0] = 4;
  +                     const XPathExpression::OpCodeMapValueVectorType         
theArgs(1, 4);
   
                        
m_expression->appendOpCode(XPathExpression::eMATCH_ANY_ANCESTOR_WITH_PREDICATE,
                                                                           
theArgs);
  @@ -2217,10 +2206,8 @@
        {
                const int       newOpPos = m_expression->opCodeMapLength();
   
  -             XPathExpression::OpCodeMapValueVectorType       theArgs(1, 0);
  -
                // Tell how long the step is without the predicate
  -             theArgs[0] = 4;
  +             const XPathExpression::OpCodeMapValueVectorType         
theArgs(1, 4);
   
                if(lookahead(XalanUnicode::charSolidus, 1) == true)
                {
  
  
  

Reply via email to