reverting as per scc's request

This commit is contained in:
pavlov%netscape.com 1999-07-22 05:34:19 +00:00
Родитель 16e2ba6a23
Коммит d7695c62cf
1 изменённых файлов: 3 добавлений и 7 удалений

Просмотреть файл

@ -23,7 +23,6 @@
#include "plstr.h"
#include "nscore.h"
#include "prtypes.h"
#include "nsCppSharedAllocator.h"
#define CR '\015'
#define LF '\012'
@ -197,15 +196,12 @@ public:
static PRInt32 strncasecmp(const PRUnichar* s1, const char* s2,
PRUint32 aMaxLen);
// Note: uses the global shared allocator |nsAllocator| through the C++
// |nsCppSharedAllocator| interface (matches C++ standard allocators).
// So must the corresponding |free|, as below, must do the same.
// Note: uses new[] to allocate memory, so you must use delete[] to
// free the memory
static PRUnichar* strdup(const PRUnichar* str);
static void free(PRUnichar* str) {
nsCppSharedAllocator<PRUnichar> shared_allocator;
shared_allocator.deallocate(str, 0 /*we never new or kept the size*/);
// delete[] str;
delete[] str;
}
/// Compute a hashcode for a C string