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

Commit

Permalink
Merge pull request #2743 from JinShil/deprecate_callStrucDtorsDuringGC
Browse files Browse the repository at this point in the history
Deprecated callStructDtorsDuringGC
  • Loading branch information
thewilsonator committed Aug 19, 2019
2 parents 397b38f + 58b569e commit 52881f5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions changelog/deprecate-callStructDtorsDuringGC.dd
@@ -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
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

0 comments on commit 52881f5

Please sign in to comment.