Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 50fe233

Browse files
committed
[rt/aaA] Add _aaNew function to initialize AA
Part of https://issues.dlang.org/show_bug.cgi?id=10535.
1 parent b1d71cc commit 50fe233

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/rt/aaA.d

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,14 @@ pure nothrow @nogc unittest
485485
// API Implementation
486486
//------------------------------------------------------------------------------
487487

488+
/// Allocate new AA implementation.
489+
extern (C) AA _aaNew(const TypeInfo_AssociativeArray ti)
490+
{
491+
AA aa;
492+
aa.impl = new Impl(ti);
493+
return aa;
494+
}
495+
488496
/// Determine number of entries in associative array.
489497
extern (C) size_t _aaLen(scope const AA aa) pure nothrow @nogc
490498
{

0 commit comments

Comments
 (0)