dbertoni    2003/07/11 18:19:04

  Modified:    c/src/xalanc/XSLT StylesheetRoot.cpp
  Log:
  Make the construction of a KeyTable exception-safe.
  
  Revision  Changes    Path
  1.4       +6 -4      xml-xalan/c/src/xalanc/XSLT/StylesheetRoot.cpp
  
  Index: StylesheetRoot.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/StylesheetRoot.cpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StylesheetRoot.cpp        10 Jul 2003 21:42:37 -0000      1.3
  +++ StylesheetRoot.cpp        12 Jul 2003 01:19:04 -0000      1.4
  @@ -790,16 +790,18 @@
                }
                else
                {
  -                     KeyTable* const kt =
  +                     XalanAutoPtr<KeyTable>  kt(
                                new KeyTable(
                                                         theKeyNode,
                                                         resolver,
                                                         m_keyDeclarations,
  -                                                      executionContext);
  +                                                      executionContext));
   
  -                     theKeysTable[theKeyNode] = kt;
  +                     theKeysTable[theKeyNode] = kt.get();
   
  -                     const MutableNodeRefList&       nl = 
kt->getNodeSetByKey(qname, ref);
  +                     const KeyTable* const   theNewTable = kt.release();
  +
  +                     const MutableNodeRefList&       nl = 
theNewTable->getNodeSetByKey(qname, ref);
   
                        if (nodelist.empty() == true)
                        {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to