Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
/ druntime Public archive
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog/deprecate-callStructDtorsDuringGC.dd
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
The druntime option `callStructDtorsDuringGC` has been deprecated.

Starting with this release utilizing the `callStructDtorsDuringGC` runtime option will result in a
deprecation message printed to `stderr`. The option will be removed in a future release.
7 changes: 7 additions & 0 deletions src/rt/lifetime.d
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,14 @@ extern (C) void lifetime_init()
import rt.config;
string s = rt_configOption("callStructDtorsDuringGC");
if (s != null)
{
// @@@DEPRECATED_v2.094@@@
// Deprecated in v2.088.
// To be removed in v2.094, if not earlier.
import core.stdc.stdio : fprintf, stderr;
fprintf(stderr, "Deprecation: The `callStructDtorsDuringGC` option has been deprecated and will be removed in a future release.\n");
cast() callStructDtorsDuringGC = s[0] == '1' || s[0] == 'y' || s[0] == 'Y';
}
else
cast() callStructDtorsDuringGC = true;
}
Expand Down