From cd69e46bece5a4c4dc69c186b448e62ae77be8de Mon Sep 17 00:00:00 2001 From: "beard%netscape.com" Date: Sat, 8 Apr 2000 00:48:13 +0000 Subject: [PATCH] conforming to MSVC++ allocators --- js/js2/gc_allocator.h | 4 ++++ js2/src/gc_allocator.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/js/js2/gc_allocator.h b/js/js2/gc_allocator.h index 2e48763f8091..3e78f1e3e900 100644 --- a/js/js2/gc_allocator.h +++ b/js/js2/gc_allocator.h @@ -140,6 +140,10 @@ namespace JavaScript { template struct rebind { typedef gc_allocator other; }; + // raw byte allocator used on some platforms (grrr). + typedef char _Char[1]; + static char* _Charalloc(size_type n) { return rebind<_Char>::other::allocate(n); } + static void collect() { GC_gcollect(); } }; } diff --git a/js2/src/gc_allocator.h b/js2/src/gc_allocator.h index 2e48763f8091..3e78f1e3e900 100644 --- a/js2/src/gc_allocator.h +++ b/js2/src/gc_allocator.h @@ -140,6 +140,10 @@ namespace JavaScript { template struct rebind { typedef gc_allocator other; }; + // raw byte allocator used on some platforms (grrr). + typedef char _Char[1]; + static char* _Charalloc(size_type n) { return rebind<_Char>::other::allocate(n); } + static void collect() { GC_gcollect(); } }; }