mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-26 23:23:33 +00:00
Add a quick constructor for nsISupportsPRBool as well as make it implement
threadsafe isupports. Stream convs. use it.
This commit is contained in:
parent
857df0c253
commit
a6cd5c0692
@ -272,4 +272,7 @@ interface nsISupportsVoid : nsISupports
|
||||
{ 0xba, 0xf8, 0x0, 0x80, 0x5f, 0x8a, 0x5d, 0xd7 } }
|
||||
#define NS_SUPPORTS_VOID_PROGID "component://netscape/supports-void"
|
||||
#define NS_SUPPORTS_VOID_CLASSNAME "Supports void"
|
||||
|
||||
extern NS_COM nsresult NS_NewISupportsPRBool (nsISupportsPRBool ** aResult);
|
||||
|
||||
%}
|
||||
|
@ -233,7 +233,7 @@ NS_IMETHODIMP nsSupportsWStringImpl::SetDataWithLength(PRInt32 aLength, const PR
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsSupportsPRBoolImpl, nsISupportsPRBool)
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS1(nsSupportsPRBoolImpl, nsISupportsPRBool)
|
||||
|
||||
nsSupportsPRBoolImpl::nsSupportsPRBoolImpl()
|
||||
: mData(PR_FALSE)
|
||||
@ -274,6 +274,21 @@ NS_IMETHODIMP nsSupportsPRBoolImpl::ToString(char **_retval)
|
||||
return result ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
NS_COM nsresult
|
||||
NS_NewISupportsPRBool (nsISupportsPRBool ** aResult)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER (aResult);
|
||||
nsISupportsPRBool * rval = (nsISupportsPRBool *) (new nsSupportsPRBoolImpl ());
|
||||
|
||||
if (!rval)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
NS_ADDREF (rval);
|
||||
*aResult = rval;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsSupportsPRUint8Impl, nsISupportsPRUint8)
|
||||
|
Loading…
x
Reference in New Issue
Block a user