зеркало из https://github.com/mozilla/pjs.git
Damn the nmake build system and the mac.
This commit is contained in:
Родитель
412afec88c
Коммит
e09380bfb2
|
@ -47,12 +47,16 @@
|
|||
|
||||
#include "nsSample.h"
|
||||
#include "nsMemory.h"
|
||||
#ifdef XPCOM_GLUE
|
||||
#include "nsXPCOMGlue.h"
|
||||
#endif
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsSampleImpl::nsSampleImpl() : mValue(nsnull)
|
||||
{
|
||||
#ifdef XPCOM_GLUE
|
||||
XPCOMGlueStartup("XPCOMComponentGlue");
|
||||
#endif
|
||||
NS_INIT_ISUPPORTS();
|
||||
mValue = (char*)nsMemory::Clone("initial value", 14);
|
||||
}
|
||||
|
@ -62,7 +66,9 @@ nsSampleImpl::~nsSampleImpl()
|
|||
if (mValue)
|
||||
nsMemory::Free(mValue);
|
||||
|
||||
#ifdef XPCOM_GLUE
|
||||
XPCOMGlueShutdown();
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -48,7 +48,10 @@
|
|||
#include "nsIServiceManager.h"
|
||||
#include "nsXPIDLString.h"
|
||||
#include "nsIComponentRegistrar.h"
|
||||
|
||||
#ifdef XPCOM_GLUE
|
||||
#include "nsXPCOMGlue.h"
|
||||
#endif
|
||||
|
||||
#define NS_SAMPLE_CONTRACTID "@mozilla.org/sample;1"
|
||||
|
||||
|
@ -57,7 +60,9 @@ main(void)
|
|||
{
|
||||
nsresult rv;
|
||||
|
||||
#ifdef XPCOM_GLUE
|
||||
XPCOMGlueStartup(nsnull);
|
||||
#endif
|
||||
|
||||
// Initialize XPCOM
|
||||
nsCOMPtr<nsIServiceManager> servMan;
|
||||
|
@ -135,6 +140,8 @@ main(void)
|
|||
// Shutdown XPCOM
|
||||
NS_ShutdownXPCOM(nsnull);
|
||||
|
||||
|
||||
#ifdef XPCOM_GLUE
|
||||
XPCOMGlueShutdown();
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче