diff options
| author | Eugen Wissner <belka@caraus.de> | 2018-02-25 21:33:29 +0100 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2018-02-25 21:33:29 +0100 |
| commit | 760cea163db580a4508160d1d9960758eb90a5c0 (patch) | |
| tree | 02fccc3644617a06430d04e6b412d46ee4ae3ea9 | |
| parent | 03c40ecace46778ef2ac80a7bce08d706de7e4c6 (diff) | |
| download | tanya-760cea163db580a4508160d1d9960758eb90a5c0.tar.gz | |
Add a workaround for dmd 2.076.1 on OSX
| -rw-r--r-- | source/tanya/container/list.d | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/tanya/container/list.d b/source/tanya/container/list.d index f930240..1d4943a 100644 --- a/source/tanya/container/list.d +++ b/source/tanya/container/list.d @@ -639,7 +639,7 @@ struct SList(T) { auto n = this.head.next; - this.allocator.dispose(this.head); + this.allocator_.dispose(this.head); this.head = n; } @@ -2038,7 +2038,10 @@ struct DList(T) while (e !is tailNext) { auto next = e.next; - allocator.dispose(e); + /* Workaround for dmd 2.076.1 bug on OSX. Invariants fail when + the allocator is called. Here it should be safe to use + allocator_ directory, since the list isn't empty. */ + this.allocator_.dispose(e); e = next; } @@ -2057,7 +2060,7 @@ struct DList(T) this.head = null; } *r.head = tailNext; - *r.tail = tail; + *r.tail = this.tail; return r; } |
