From ec1b27c4900e33e5b9c2aedc2a2946afb0dc9bf2 Mon Sep 17 00:00:00 2001 From: "scc%mozilla.org" Date: Wed, 16 May 2001 04:49:20 +0000 Subject: [PATCH] bug #75220: sr=jst, r=dr; rename |nsCommon[C]String| to |nsSharable[C]String|. Stop building the old implementation in "nsCommonString.cpp", and |typedef| the old type to an alias for |nsSharable[C]String|. git-svn-id: svn://10.0.0.236/trunk@95105 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/string/macbuild/string.mcp | Bin 75711 -> 75711 bytes mozilla/string/public/nsCommonString.h | 77 ++----------------- mozilla/string/src/Makefile.in | 1 - mozilla/string/src/makefile.win | 1 - mozilla/xpcom/string/macbuild/string.mcp | Bin 75711 -> 75711 bytes mozilla/xpcom/string/public/nsCommonString.h | 77 ++----------------- mozilla/xpcom/string/src/Makefile.in | 1 - mozilla/xpcom/string/src/makefile.win | 1 - 8 files changed, 10 insertions(+), 148 deletions(-) diff --git a/mozilla/string/macbuild/string.mcp b/mozilla/string/macbuild/string.mcp index 51282fd46ba04cdbf8c979632ccaac01960b0733..673ff34d6c4ca53c1c7274b538059fffd0c4433e 100644 GIT binary patch delta 312 zcmdmgo@M`emJRngCrgD0@ER~MFc<={5eQFo)MqrAtixrlXaeLqFaZf5wgXZiB@WC$ z0*Jx<%`IG0SSQB^&!22}j)&2BGJl9Px>*LBWdt=H*g|st|8G9J**kDQ)8wrABAj|a zQ}jW2qNBy;_>e3P4AIH?XXj7e7oxcNUhEoGL0&gcA6FKj>!7sSX=;_&F^Q{;xj}es&m;|ATQe|NrlD nj2E`E%P~G?Vw9NvT7l6R$dy-Q3}<3Ivb|gxLZ4S<{J;nRq6Jz6 delta 289 zcmdmgo@M`emJRng8BHeN;gp}~qQhu9S%=G9(UgIK!GQ@#0I?mAG6M0LfdmkP`I}p~ zrm(Uw0(q0;gXd4SJIBLo43yRaVr?LX8mGBgMo`m%EqMF?|H}_;_72?7#ArB~Jp^cx z>E`&5EDktta{k%*llO%vZoU`0Mpcr}&C|z~1!yajR)f-ZlV>;I++5S*Tf`Pv@&Es; zvzr~|e=|-#^+O!UXJDv`f$$&wg78z)A^cx|K>YvzFF64DKNvUj|Nkz>cx5}g9OGjq eMw#ia6&Q_yTzN&ta3;nR+sl<9^m$dr4~zgF(p;$k 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 51282fd46ba04cdbf8c979632ccaac01960b0733..673ff34d6c4ca53c1c7274b538059fffd0c4433e 100644 GIT binary patch delta 312 zcmdmgo@M`emJRngCrgD0@ER~MFc<={5eQFo)MqrAtixrlXaeLqFaZf5wgXZiB@WC$ z0*Jx<%`IG0SSQB^&!22}j)&2BGJl9Px>*LBWdt=H*g|st|8G9J**kDQ)8wrABAj|a zQ}jW2qNBy;_>e3P4AIH?XXj7e7oxcNUhEoGL0&gcA6FKj>!7sSX=;_&F^Q{;xj}es&m;|ATQe|NrlD nj2E`E%P~G?Vw9NvT7l6R$dy-Q3}<3Ivb|gxLZ4S<{J;nRq6Jz6 delta 289 zcmdmgo@M`emJRng8BHeN;gp}~qQhu9S%=G9(UgIK!GQ@#0I?mAG6M0LfdmkP`I}p~ zrm(Uw0(q0;gXd4SJIBLo43yRaVr?LX8mGBgMo`m%EqMF?|H}_;_72?7#ArB~Jp^cx z>E`&5EDktta{k%*llO%vZoU`0Mpcr}&C|z~1!yajR)f-ZlV>;I++5S*Tf`Pv@&Es; zvzr~|e=|-#^+O!UXJDv`f$$&wg78z)A^cx|K>YvzFF64DKNvUj|Nkz>cx5}g9OGjq eMw#ia6&Q_yTzN&ta3;nR+sl<9^m$dr4~zgF(p;$k 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 \