зеркало из https://github.com/mozilla/pjs.git
Removed two evil exported functions which I added. Well actually, I added them as inlines, but they somehow changed. So since I don't want them as exports, dust to dust, and ashes to ashes.
This commit is contained in:
Родитель
d972a3383b
Коммит
62f7b85e62
|
@ -20,7 +20,6 @@
|
|||
|
||||
#include "nsIFileStream.h"
|
||||
#include "nsFileStream.h"
|
||||
#include "nsIComponentManager.h" // For CreateInstance()
|
||||
|
||||
#include "prmem.h"
|
||||
|
||||
|
@ -710,32 +709,3 @@ nsresult NS_NewDirectoryIterator(nsIDirectoryIterator** result)
|
|||
return nsDirectoryIteratorImpl::Create(nsnull, nsIDirectoryIterator::GetIID(), (void**)result);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
// Convinence functions for creating instances
|
||||
//----------------------------------------------------------------------------------------
|
||||
nsIFileSpec* NS_CreateFileSpec()
|
||||
{
|
||||
// #include nsIComponentManager.h
|
||||
nsIFileSpec* spec = nsnull;
|
||||
nsresult rv = nsComponentManager::CreateInstance(
|
||||
(const char*)NS_FILESPEC_PROGID,
|
||||
(nsISupports*)nsnull,
|
||||
(const nsID&)nsIFileSpec::GetIID(),
|
||||
(void**)&spec);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "ERROR: Could not make a file spec.");
|
||||
return spec;
|
||||
}
|
||||
|
||||
nsIDirectoryIterator* NS_CreateDirectoryIterator()
|
||||
{
|
||||
// #include nsIComponentManager.h
|
||||
nsIDirectoryIterator* iter = nsnull;
|
||||
nsresult rv = nsComponentManager::CreateInstance(
|
||||
(const char*)NS_DIRECTORYITERATOR_PROGID,
|
||||
(nsISupports*)nsnull,
|
||||
(const nsID&)nsIDirectoryIterator::GetIID(),
|
||||
(void**)&iter);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "ERROR: Could not make a directory iterator.");
|
||||
return iter;
|
||||
}
|
||||
|
||||
|
|
|
@ -139,10 +139,6 @@ NS_COM nsresult NS_NewFileSpecWithSpec(nsFileSpec aSrcFileSpec, nsIFileSpec **re
|
|||
NS_COM nsresult NS_NewFileSpec(nsIFileSpec** result);
|
||||
NS_COM nsresult NS_NewDirectoryIterator(nsIDirectoryIterator** result);
|
||||
|
||||
// Convinience functions for creation of xpcom objects
|
||||
NS_COM nsIFileSpec* NS_CreateFileSpec();
|
||||
NS_COM nsIDirectoryIterator* NS_CreateDirectoryIterator();
|
||||
|
||||
#define NS_BOOL_ACCESSOR(_method) { PRBool yes; return NS_SUCCEEDED(f->_method(&yes)) && yes; }
|
||||
inline PRBool Exists(nsIFileSpec* f) NS_BOOL_ACCESSOR(exists)
|
||||
inline PRBool Exists(nsIDirectoryIterator* f) NS_BOOL_ACCESSOR(exists)
|
||||
|
|
Загрузка…
Ссылка в новой задаче