зеркало из https://github.com/mozilla/gecko-dev.git
conforming to MSVC++ allocators
This commit is contained in:
Родитель
932870c3c6
Коммит
cd69e46bec
|
@ -140,6 +140,10 @@ namespace JavaScript {
|
|||
|
||||
template<class U> struct rebind { typedef gc_allocator<U> 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(); }
|
||||
};
|
||||
}
|
||||
|
|
|
@ -140,6 +140,10 @@ namespace JavaScript {
|
|||
|
||||
template<class U> struct rebind { typedef gc_allocator<U> 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(); }
|
||||
};
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче