From b78d57e34f3703f03a21018673720bcc48360ac3 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Sat, 25 Aug 2018 01:41:02 +0200 Subject: [PATCH] src: deprecate option variables in public API These variables should never have been exposed as part of the public API, and certainly not as variables. Using CLI options parser is the right thing to do here, at least until we expose some part of the options parser API publicly (which should be possible to do now). --- src/node.h | 15 +++++++++------ src/node_buffer.h | 5 +++-- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/node.h b/src/node.h index ab82be7ac4d30f..1bfa3d2c492cd7 100644 --- a/src/node.h +++ b/src/node.h @@ -199,14 +199,17 @@ typedef intptr_t ssize_t; namespace node { -// TODO(addaleax): Deprecate and remove all of these ASAP. They have been -// made effectively non-functional anyway. -NODE_EXTERN extern bool no_deprecation; +// TODO(addaleax): Remove all of these. +NODE_DEPRECATED("use command-line flags", + NODE_EXTERN extern bool no_deprecation); #if HAVE_OPENSSL -NODE_EXTERN extern bool ssl_openssl_cert_store; +NODE_DEPRECATED("use command-line flags", + NODE_EXTERN extern bool ssl_openssl_cert_store); # if NODE_FIPS_MODE -NODE_EXTERN extern bool enable_fips_crypto; -NODE_EXTERN extern bool force_fips_crypto; +NODE_DEPRECATED("use command-line flags", + NODE_EXTERN extern bool enable_fips_crypto); +NODE_DEPRECATED("user command-line flags", + NODE_EXTERN extern bool force_fips_crypto); # endif #endif diff --git a/src/node_buffer.h b/src/node_buffer.h index e8d306e7dd6bff..c1e3b859483e01 100644 --- a/src/node_buffer.h +++ b/src/node_buffer.h @@ -27,8 +27,9 @@ namespace node { -// TODO(addaleax): Deprecate and remove this ASAP. -extern bool zero_fill_all_buffers; +// TODO(addaleax): Remove this. +NODE_DEPRECATED("use command-line flags", + extern bool zero_fill_all_buffers); namespace Buffer {