xo-alloc: explicit typeseq arg to alloc
This commit is contained in:
parent
8c56a94238
commit
6bd33bd900
22 changed files with 99 additions and 48 deletions
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
namespace xo {
|
||||
using xo::mm::AGCObject;
|
||||
using xo::facet::typeseq;
|
||||
|
||||
namespace scm {
|
||||
static DList s_null(obj<AGCObject>(), nullptr);
|
||||
|
|
@ -22,7 +23,7 @@ namespace xo {
|
|||
DList::list(obj<AAllocator> mm,
|
||||
obj<AGCObject> h1)
|
||||
{
|
||||
void * mem = mm.alloc(sizeof(DList));
|
||||
void * mem = mm.alloc(typeseq::id<DList>(), sizeof(DList));
|
||||
|
||||
return new (mem) DList(h1, DList::null());
|
||||
}
|
||||
|
|
@ -32,7 +33,7 @@ namespace xo {
|
|||
obj<AGCObject> h1,
|
||||
obj<AGCObject> h2)
|
||||
{
|
||||
void * mem = mm.alloc(sizeof(DList));
|
||||
void * mem = mm.alloc(typeseq::id<DList>(), sizeof(DList));
|
||||
|
||||
return new (mem) DList(h1, DList::list(mm, h2));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue