Renaming nsIAllocator to nsIMemory (and nsAllocator to nsMemory). API cleanup/freeze. Bug #18433

This commit is contained in:
warren@netscape.com
2000-06-03 09:46:12 +00:00
parent 1839b45a21
commit 6a06dfc026
276 changed files with 1145 additions and 1382 deletions

View File

@@ -21,7 +21,7 @@
*/
#include "nsScriptableInputStream.h"
#include "nsIAllocator.h"
#include "nsMemory.h"
NS_IMPL_ISUPPORTS2(nsScriptableInputStream, nsIBaseStream, nsIScriptableInputStream);
@@ -58,13 +58,13 @@ nsScriptableInputStream::Read(PRUint32 aCount, char **_retval) {
if (NS_FAILED(rv)) return rv;
count = PR_MIN(count, aCount);
buffer = (char*)nsAllocator::Alloc(count+1); // make room for '\0'
buffer = (char*)nsMemory::Alloc(count+1); // make room for '\0'
if (!buffer) return NS_ERROR_OUT_OF_MEMORY;
PRUint32 amtRead = 0;
rv = mInputStream->Read(buffer, count, &amtRead);
if (NS_FAILED(rv)) {
nsAllocator::Free(buffer);
nsMemory::Free(buffer);
return rv;
}