Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXadillaX <i@2333.moe>2021-09-24 08:59:45 +0300
committerXadillaX <i@2333.moe>2021-09-26 11:57:47 +0300
commit0e561de643ab38c6a3b5c9912c2abd0b1527c14c (patch)
tree242bf31c9dca1f4f88bd5a4ab8301663209c43e7 /src/util-inl.h
parent281607d45394964f575b16034634295b3f596b7d (diff)
src: move `ToUSVString()` to node_util.cc
Since `toUSVString()` was exposed in `util` as a public API, not only for internal `url` any more. PR-URL: https://github.com/nodejs/node/pull/40204 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Diffstat (limited to 'src/util-inl.h')
-rw-r--r--src/util-inl.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/util-inl.h b/src/util-inl.h
index 517da707170..b860c7008a3 100644
--- a/src/util-inl.h
+++ b/src/util-inl.h
@@ -64,6 +64,14 @@
(((x) & 0x00000000000000FFull) << 56)
#endif
+#define CHAR_TEST(bits, name, expr) \
+ template <typename T> \
+ bool name(const T ch) { \
+ static_assert(sizeof(ch) >= (bits) / 8, \
+ "Character must be wider than " #bits " bits"); \
+ return (expr); \
+ }
+
namespace node {
template <typename T>