diff --git a/mozilla/string/macbuild/string.mcp b/mozilla/string/macbuild/string.mcp index 51282fd46ba..673ff34d6c4 100644 Binary files a/mozilla/string/macbuild/string.mcp and b/mozilla/string/macbuild/string.mcp differ diff --git a/mozilla/string/public/nsCommonString.h b/mozilla/string/public/nsCommonString.h index 9504e399776..7fbd0fd7d94 100644 --- a/mozilla/string/public/nsCommonString.h +++ b/mozilla/string/public/nsCommonString.h @@ -21,84 +21,17 @@ * Scott Collins (original author) */ -/* nsCommonString.h --- a string implementation that shares its underlying storage */ +/* nsCommonString.h --- a deprecated synonym for |nsSharable[C]String| */ #ifndef nsCommonString_h___ #define nsCommonString_h___ -#ifndef nsAFlatString_h___ -#include "nsAFlatString.h" +#ifndef nsSharableString_h___ +#include "nsSharableString.h" #endif -#ifndef nsBufferHandleUtils_h___ -#include "nsBufferHandleUtils.h" -#endif - -//-------1---------2---------3---------4---------5---------6---------7---------8 - - /** - * Not yet ready for non-|const| access - */ - -class NS_COM nsCommonString - : public nsAFlatString - { - public: - typedef nsCommonString self_type; - typedef PRUnichar char_type; - typedef nsAString string_type; - - public: - nsCommonString() { } - nsCommonString( const self_type& aOther ) : mBuffer(aOther.mBuffer) { } - explicit nsCommonString( const string_type& aReadable ) { assign(aReadable); } - explicit nsCommonString( const nsSharedBufferHandle* aHandle ) : mBuffer(aHandle) { } - - self_type& - operator=( const string_type& aReadable ) - { - assign(aReadable); - return *this; - } - - protected: - void assign( const string_type& ); - virtual const nsSharedBufferHandle* GetSharedBufferHandle() const; - - private: - nsAutoBufferHandle mBuffer; - }; - - -class NS_COM nsCommonCString - : public nsAFlatCString - { - public: - typedef nsCommonCString self_type; - typedef char char_type; - typedef nsACString string_type; - - public: - nsCommonCString() { } - nsCommonCString( const self_type& aOther ) : mBuffer(aOther.mBuffer) { } - explicit nsCommonCString( const string_type& aReadable ) { assign(aReadable); } - explicit nsCommonCString( const nsSharedBufferHandle* aHandle ) : mBuffer(aHandle) { } - - self_type& - operator=( const string_type& aReadable ) - { - assign(aReadable); - return *this; - } - - protected: - void assign( const string_type& ); - virtual const nsSharedBufferHandle* GetSharedBufferHandle() const; - - private: - nsAutoBufferHandle mBuffer; - }; - +typedef nsSharableString nsCommonString; +typedef nsSharableCString nsCommonCString; #endif /* !defined(nsCommonString_h___) */ diff --git a/mozilla/string/src/Makefile.in b/mozilla/string/src/Makefile.in index 578c9aa57a0..8b9d5ee1b9c 100644 --- a/mozilla/string/src/Makefile.in +++ b/mozilla/string/src/Makefile.in @@ -36,7 +36,6 @@ REQUIRES = xpcom CPPSRCS = \ nsAFlatString.cpp \ nsAString.cpp \ - nsCommonString.cpp \ nsFragmentedString.cpp \ nsLocalString.cpp \ nsPrintfCString.cpp \ diff --git a/mozilla/string/src/makefile.win b/mozilla/string/src/makefile.win index 222ab2788d7..cd1ed65060f 100644 --- a/mozilla/string/src/makefile.win +++ b/mozilla/string/src/makefile.win @@ -31,7 +31,6 @@ LCFLAGS = -D_IMPL_NS_COM -D_IMPL_NS_BASE -DWIN32_LEAN_AND_MEAN CPP_OBJS = \ .\$(OBJDIR)\nsAFlatString.obj \ .\$(OBJDIR)\nsAString.obj \ - .\$(OBJDIR)\nsCommonString.obj \ .\$(OBJDIR)\nsFragmentedString.obj \ .\$(OBJDIR)\nsLocalString.obj \ .\$(OBJDIR)\nsPrintfCString.obj \ diff --git a/mozilla/xpcom/string/macbuild/string.mcp b/mozilla/xpcom/string/macbuild/string.mcp index 51282fd46ba..673ff34d6c4 100644 Binary files a/mozilla/xpcom/string/macbuild/string.mcp and b/mozilla/xpcom/string/macbuild/string.mcp differ diff --git a/mozilla/xpcom/string/public/nsCommonString.h b/mozilla/xpcom/string/public/nsCommonString.h index 9504e399776..7fbd0fd7d94 100644 --- a/mozilla/xpcom/string/public/nsCommonString.h +++ b/mozilla/xpcom/string/public/nsCommonString.h @@ -21,84 +21,17 @@ * Scott Collins (original author) */ -/* nsCommonString.h --- a string implementation that shares its underlying storage */ +/* nsCommonString.h --- a deprecated synonym for |nsSharable[C]String| */ #ifndef nsCommonString_h___ #define nsCommonString_h___ -#ifndef nsAFlatString_h___ -#include "nsAFlatString.h" +#ifndef nsSharableString_h___ +#include "nsSharableString.h" #endif -#ifndef nsBufferHandleUtils_h___ -#include "nsBufferHandleUtils.h" -#endif - -//-------1---------2---------3---------4---------5---------6---------7---------8 - - /** - * Not yet ready for non-|const| access - */ - -class NS_COM nsCommonString - : public nsAFlatString - { - public: - typedef nsCommonString self_type; - typedef PRUnichar char_type; - typedef nsAString string_type; - - public: - nsCommonString() { } - nsCommonString( const self_type& aOther ) : mBuffer(aOther.mBuffer) { } - explicit nsCommonString( const string_type& aReadable ) { assign(aReadable); } - explicit nsCommonString( const nsSharedBufferHandle* aHandle ) : mBuffer(aHandle) { } - - self_type& - operator=( const string_type& aReadable ) - { - assign(aReadable); - return *this; - } - - protected: - void assign( const string_type& ); - virtual const nsSharedBufferHandle* GetSharedBufferHandle() const; - - private: - nsAutoBufferHandle mBuffer; - }; - - -class NS_COM nsCommonCString - : public nsAFlatCString - { - public: - typedef nsCommonCString self_type; - typedef char char_type; - typedef nsACString string_type; - - public: - nsCommonCString() { } - nsCommonCString( const self_type& aOther ) : mBuffer(aOther.mBuffer) { } - explicit nsCommonCString( const string_type& aReadable ) { assign(aReadable); } - explicit nsCommonCString( const nsSharedBufferHandle* aHandle ) : mBuffer(aHandle) { } - - self_type& - operator=( const string_type& aReadable ) - { - assign(aReadable); - return *this; - } - - protected: - void assign( const string_type& ); - virtual const nsSharedBufferHandle* GetSharedBufferHandle() const; - - private: - nsAutoBufferHandle mBuffer; - }; - +typedef nsSharableString nsCommonString; +typedef nsSharableCString nsCommonCString; #endif /* !defined(nsCommonString_h___) */ diff --git a/mozilla/xpcom/string/src/Makefile.in b/mozilla/xpcom/string/src/Makefile.in index 578c9aa57a0..8b9d5ee1b9c 100644 --- a/mozilla/xpcom/string/src/Makefile.in +++ b/mozilla/xpcom/string/src/Makefile.in @@ -36,7 +36,6 @@ REQUIRES = xpcom CPPSRCS = \ nsAFlatString.cpp \ nsAString.cpp \ - nsCommonString.cpp \ nsFragmentedString.cpp \ nsLocalString.cpp \ nsPrintfCString.cpp \ diff --git a/mozilla/xpcom/string/src/makefile.win b/mozilla/xpcom/string/src/makefile.win index 222ab2788d7..cd1ed65060f 100644 --- a/mozilla/xpcom/string/src/makefile.win +++ b/mozilla/xpcom/string/src/makefile.win @@ -31,7 +31,6 @@ LCFLAGS = -D_IMPL_NS_COM -D_IMPL_NS_BASE -DWIN32_LEAN_AND_MEAN CPP_OBJS = \ .\$(OBJDIR)\nsAFlatString.obj \ .\$(OBJDIR)\nsAString.obj \ - .\$(OBJDIR)\nsCommonString.obj \ .\$(OBJDIR)\nsFragmentedString.obj \ .\$(OBJDIR)\nsLocalString.obj \ .\$(OBJDIR)\nsPrintfCString.obj \