std: Convert statics to constants
This commit repurposes most statics as constants in the standard library itself, with the exception of TLS keys which precisely have their own memory location as an implementation detail. This commit also rewrites the bitflags syntax to use `const` instead of `static`. All invocations will need to replace the word `static` with `const` when declaring flags. Due to the modification of the `bitflags!` syntax, this is a: [breaking-change]
This commit is contained in:
parent
d9874bfb40
commit
ab5935c88d
9 changed files with 129 additions and 129 deletions
|
@ -32,16 +32,16 @@ use std::hash::sip::SipState;
|
|||
|
||||
/// Signal a process to exit, without forcibly killing it. Corresponds to
|
||||
/// SIGTERM on unix platforms.
|
||||
#[cfg(windows)] pub static PleaseExitSignal: int = 15;
|
||||
#[cfg(windows)] pub const PleaseExitSignal: int = 15;
|
||||
/// Signal a process to exit immediately, forcibly killing it. Corresponds to
|
||||
/// SIGKILL on unix platforms.
|
||||
#[cfg(windows)] pub static MustDieSignal: int = 9;
|
||||
#[cfg(windows)] pub const MustDieSignal: int = 9;
|
||||
/// Signal a process to exit, without forcibly killing it. Corresponds to
|
||||
/// SIGTERM on unix platforms.
|
||||
#[cfg(not(windows))] pub static PleaseExitSignal: int = libc::SIGTERM as int;
|
||||
#[cfg(not(windows))] pub const PleaseExitSignal: int = libc::SIGTERM as int;
|
||||
/// Signal a process to exit immediately, forcibly killing it. Corresponds to
|
||||
/// SIGKILL on unix platforms.
|
||||
#[cfg(not(windows))] pub static MustDieSignal: int = libc::SIGKILL as int;
|
||||
#[cfg(not(windows))] pub const MustDieSignal: int = libc::SIGKILL as int;
|
||||
|
||||
/// Representation of a running or exited child process.
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue