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

git-svn-id: svn://10.0.0.236/trunk@71450 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
warren%netscape.com
2000-06-03 09:46:12 +00:00
parent 1129de8b91
commit cc5d426fbe
317 changed files with 1275 additions and 1512 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;
}