Update of /cvsroot/cppunit/cppunit/include/cppunit
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19361/include/cppunit
Modified Files:
Message.h SourceLine.h
Log Message:
* added specific copy constructor implementatin to ensure string buffer are detached during copy (therefore providing thread-safe copy constructor for non thread-safe std::string copy constructor implementation).
Index: Message.h
===================================================================
RCS file: /cvsroot/cppunit/cppunit/include/cppunit/Message.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Message.h 29 Aug 2002 07:36:50 -0000 1.5
--- Message.h 19 Nov 2004 20:00:44 -0000 1.6
***************
*** 41,44 ****
--- 41,47 ----
Message();
+ // Ensure thread-safe copy by detaching the string.
+ Message( const Message &other );
+
explicit Message( const std::string &shortDescription );
***************
*** 55,58 ****
--- 58,63 ----
const std::string &detail3 );
+ Message &operator =( const Message &other );
+
/*! \brief Returns the short description.
* \return Short description.
***************
*** 128,132 ****
bool operator ==( const Message &other ) const;
-
/*! \brief Tests if a message is different from another one.
* \param other Message this message is compared to.
--- 133,136 ----
Index: SourceLine.h
===================================================================
RCS file: /cvsroot/cppunit/cppunit/include/cppunit/SourceLine.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** SourceLine.h 13 Jul 2002 10:33:49 -0000 1.6
--- SourceLine.h 19 Nov 2004 20:00:44 -0000 1.7
***************
*** 33,39 ****
--- 33,44 ----
SourceLine();
+ // Ensure thread-safe copy by detaching the string buffer.
+ SourceLine( const SourceLine &other );
+
SourceLine( const std::string &fileName,
int lineNumber );
+ SourceLine &operator =( const SourceLine &other );
+
/// Destructor.
virtual ~SourceLine();
|