From c1b0504fc144a005d82eafc2c6ef0ed122c296e7 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Fri, 2 Jan 2026 10:20:19 -0500 Subject: [PATCH] xo-alloc: explicit typeseq arg to alloc --- src/object2/DList.cpp | 5 +++-- src/object2/IGCObject_DFloat.cpp | 4 +++- src/object2/IGCObject_DInteger.cpp | 4 +++- src/object2/IGCObject_DList.cpp | 6 ++++-- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/object2/DList.cpp b/src/object2/DList.cpp index 99469d1..d95f0bd 100644 --- a/src/object2/DList.cpp +++ b/src/object2/DList.cpp @@ -8,6 +8,7 @@ namespace xo { using xo::mm::AGCObject; + using xo::facet::typeseq; namespace scm { static DList s_null(obj(), nullptr); @@ -22,7 +23,7 @@ namespace xo { DList::list(obj mm, obj h1) { - void * mem = mm.alloc(sizeof(DList)); + void * mem = mm.alloc(typeseq::id(), sizeof(DList)); return new (mem) DList(h1, DList::null()); } @@ -32,7 +33,7 @@ namespace xo { obj h1, obj h2) { - void * mem = mm.alloc(sizeof(DList)); + void * mem = mm.alloc(typeseq::id(), sizeof(DList)); return new (mem) DList(h1, DList::list(mm, h2)); } diff --git a/src/object2/IGCObject_DFloat.cpp b/src/object2/IGCObject_DFloat.cpp index a56175f..9d9a65d 100644 --- a/src/object2/IGCObject_DFloat.cpp +++ b/src/object2/IGCObject_DFloat.cpp @@ -11,6 +11,7 @@ namespace xo { using xo::mm::AAllocator; using xo::facet::obj; + using xo::facet::typeseq; using std::size_t; namespace scm { @@ -24,7 +25,8 @@ namespace xo { IGCObject_DFloat::shallow_copy(const DFloat & src, obj mm) noexcept { - DFloat * copy = (DFloat *)mm.alloc(sizeof(DFloat)); + DFloat * copy = (DFloat *)mm.alloc(typeseq::id(), + sizeof(DFloat)); if (copy) *copy = src; diff --git a/src/object2/IGCObject_DInteger.cpp b/src/object2/IGCObject_DInteger.cpp index 706ab09..d6c80bb 100644 --- a/src/object2/IGCObject_DInteger.cpp +++ b/src/object2/IGCObject_DInteger.cpp @@ -11,6 +11,7 @@ namespace xo { using xo::mm::AAllocator; using xo::facet::obj; + using xo::facet::typeseq; using std::size_t; namespace scm { @@ -24,7 +25,8 @@ namespace xo { IGCObject_DInteger::shallow_copy(const DInteger & src, obj mm) noexcept { - DInteger * copy = (DInteger *)mm.alloc(sizeof(DInteger)); + DInteger * copy = (DInteger *)mm.alloc(typeseq::id(), + sizeof(DInteger)); if (copy) *copy = src; diff --git a/src/object2/IGCObject_DList.cpp b/src/object2/IGCObject_DList.cpp index 19188df..a30f2c6 100644 --- a/src/object2/IGCObject_DList.cpp +++ b/src/object2/IGCObject_DList.cpp @@ -8,8 +8,9 @@ namespace xo { using xo::mm::AGCObject; using xo::mm::AAllocator; - using xo::facet::with_facet; + //using xo::facet::with_facet; using xo::facet::obj; + using xo::facet::typeseq; using std::size_t; namespace scm { @@ -23,7 +24,8 @@ namespace xo { IGCObject_DList::shallow_copy(const DList & src, obj mm) noexcept { - DList * copy = (DList *)mm.alloc(sizeof(DList)); + /* FIXME: need to supply object age here */ + DList * copy = (DList *)mm.alloc(typeseq::id(), sizeof(DList)); if (copy) *copy = src;