peiyongz    2003/09/25 08:21:12

  Modified:    c/src/xercesc/internal XSerializeEngine.cpp
  Log:
  Loose the assert condition so that Serializable class need NOT to check the
  actual string length before read/write.
  
  Revision  Changes    Path
  1.4       +11 -2     xml-xerces/c/src/xercesc/internal/XSerializeEngine.cpp
  
  Index: XSerializeEngine.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/internal/XSerializeEngine.cpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XSerializeEngine.cpp      23 Sep 2003 18:11:29 -0000      1.3
  +++ XSerializeEngine.cpp      25 Sep 2003 15:21:12 -0000      1.4
  @@ -57,6 +57,10 @@
   /*
    * $Id$
    * $Log$
  + * Revision 1.4  2003/09/25 15:21:12  peiyongz
  + * Loose the assert condition so that Serializable class need NOT to check the
  + * actual string length before read/write.
  + *
    * Revision 1.3  2003/09/23 18:11:29  peiyongz
    * Using HashPtr
    *
  @@ -249,6 +253,9 @@
       ensureBufferLen(writeLen);
       ensureStoreBuffer();
   
  +    if (writeLen == 0)
  +        return;
  +
       /***
        *  If the available space is sufficient, write it up
        ***/
  @@ -384,6 +391,9 @@
       ensurePointer(toRead);
       ensureLoadBuffer();
   
  +    if (readLen == 0)
  +        return;
  +
       /***
        *  If unread is sufficient, read it up
        ***/
  @@ -824,7 +834,7 @@
   inline void XSerializeEngine::ensureBufferLen(int bufferLen) const
   {
   
  -    TEST_THROW_ARG1( (bufferLen <= 0)
  +    TEST_THROW_ARG1( (bufferLen < 0)
                      , bufferLen
                      , XMLExcepts::XSer_Inv_Buffer_Len
                      )
  
  
  

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

Reply via email to