-
-
Notifications
You must be signed in to change notification settings - Fork 702
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix cycles in Phobos #4493
Fix cycles in Phobos #4493
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Written in the D programming language. | ||
|
||
/++ | ||
The purpose of this module is to perform static construction away from the | ||
normal modules to eliminate cyclic construction errors. | ||
|
||
Copyright: Copyright 2011 - 2016 | ||
License: $(HTTP www.boost.org/LICENSE_1_0.txt, Boost License 1.0). | ||
Authors: Jonathan M Davis, Kato Shoichi, Steven Schveighoffer | ||
Source: $(PHOBOSSRC std/internal/_phobosinit.d) | ||
+/ | ||
module std.internal.phobosinit; | ||
|
||
version(OSX) | ||
{ | ||
extern(C) void std_process_shared_static_this(); | ||
|
||
shared static this() | ||
{ | ||
std_process_shared_static_this(); | ||
} | ||
} | ||
|
||
shared static this() | ||
{ | ||
import std.encoding; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lots of folks would like to avoid pulling in std.encoding at all There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have to say, the way this is done in There MUST be a better way to do this... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, let's not forget that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, technically it doesn't matter for shared static this, since there is only one thread. But the fact that it's not protected at later times is bad There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
EncodingScheme.register("std.encoding.EncodingSchemeASCII"); | ||
EncodingScheme.register("std.encoding.EncodingSchemeLatin1"); | ||
EncodingScheme.register("std.encoding.EncodingSchemeLatin2"); | ||
EncodingScheme.register("std.encoding.EncodingSchemeWindows1250"); | ||
EncodingScheme.register("std.encoding.EncodingSchemeWindows1252"); | ||
EncodingScheme.register("std.encoding.EncodingSchemeUtf8"); | ||
EncodingScheme.register("std.encoding.EncodingSchemeUtf16Native"); | ||
EncodingScheme.register("std.encoding.EncodingSchemeUtf32Native"); | ||
} |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just delete these
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could if that's the consensus. The issue is that these really should go here. The example in the base class says to do it this way (and it will be fine for external libs to do that)