node-linux-s390x 22.11.0 → 22.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -797,6 +797,34 @@ The externally maintained libraries used by Node.js are:
797
797
 
798
798
  ----------------------------------------------------------------------
799
799
 
800
+ JSON parsing library (nlohmann/json)
801
+
802
+ File: vendor/json/upstream/single_include/nlohmann/json.hpp (only for ICU4C)
803
+
804
+ MIT License
805
+
806
+ Copyright (c) 2013-2022 Niels Lohmann
807
+
808
+ Permission is hereby granted, free of charge, to any person obtaining a copy
809
+ of this software and associated documentation files (the "Software"), to deal
810
+ in the Software without restriction, including without limitation the rights
811
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
812
+ copies of the Software, and to permit persons to whom the Software is
813
+ furnished to do so, subject to the following conditions:
814
+
815
+ The above copyright notice and this permission notice shall be included in all
816
+ copies or substantial portions of the Software.
817
+
818
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
819
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
820
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
821
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
822
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
823
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
824
+ SOFTWARE.
825
+
826
+ ----------------------------------------------------------------------
827
+
800
828
  File: aclocal.m4 (only for ICU4C)
801
829
  Section: pkg.m4 - Macros to locate and utilise pkg-config.
802
830
 
@@ -834,7 +862,7 @@ The externally maintained libraries used by Node.js are:
834
862
 
835
863
  This file is free software; you can redistribute it and/or modify it
836
864
  under the terms of the GNU General Public License as published by
837
- the Free Software Foundation; either version 3 of the License, or
865
+ the Free Software Foundation, either version 3 of the License, or
838
866
  (at your option) any later version.
839
867
 
840
868
  This program is distributed in the hope that it will be useful, but
package/README.md CHANGED
@@ -104,11 +104,10 @@ To download `SHASUMS256.txt` using `curl`:
104
104
  curl -O https://nodejs.org/dist/vx.y.z/SHASUMS256.txt
105
105
  ```
106
106
 
107
- To check that a downloaded file matches the checksum, run
108
- it through `sha256sum` with a command such as:
107
+ To check that downloaded files match the checksum, use `sha256sum`:
109
108
 
110
109
  ```bash
111
- grep node-vx.y.z.tar.gz SHASUMS256.txt | sha256sum -c -
110
+ sha256sum -c SHASUMS256.txt --ignore-missing
112
111
  ```
113
112
 
114
113
  For Current and LTS, the GPG detached signature of `SHASUMS256.txt` is in
@@ -320,8 +319,6 @@ For information about the governance of the Node.js project, see
320
319
  **Kohei Ueno** <<kohei.ueno119@gmail.com>> (he/him)
321
320
  * [daeyeon](https://github.com/daeyeon) -
322
321
  **Daeyeon Jeong** <<daeyeon.dev@gmail.com>> (he/him)
323
- * [danielleadams](https://github.com/danielleadams) -
324
- **Danielle Adams** <<adamzdanielle@gmail.com>> (she/her)
325
322
  * [debadree25](https://github.com/debadree25) -
326
323
  **Debadree Chatterjee** <<debadree333@gmail.com>> (he/him)
327
324
  * [deokjinkim](https://github.com/deokjinkim) -
@@ -360,6 +357,8 @@ For information about the governance of the Node.js project, see
360
357
  **Jacob Smith** <<jacob@frende.me>> (he/him)
361
358
  * [jasnell](https://github.com/jasnell) -
362
359
  **James M Snell** <<jasnell@gmail.com>> (he/him)
360
+ * [jazelly](https://github.com/jazelly) -
361
+ **Jason Zhang** <<xzha4350@gmail.com>> (he/him)
363
362
  * [jkrems](https://github.com/jkrems) -
364
363
  **Jan Krems** <<jan.krems@gmail.com>> (he/him)
365
364
  * [joyeecheung](https://github.com/joyeecheung) -
@@ -380,6 +379,8 @@ For information about the governance of the Node.js project, see
380
379
  **Nitzan Uziely** <<linkgoron@gmail.com>>
381
380
  * [LiviaMedeiros](https://github.com/LiviaMedeiros) -
382
381
  **LiviaMedeiros** <<livia@cirno.name>>
382
+ * [ljharb](https://github.com/ljharb) -
383
+ **Jordan Harband** <<ljharb@gmail.com>>
383
384
  * [lpinca](https://github.com/lpinca) -
384
385
  **Luigi Pinca** <<luigipinca@gmail.com>> (he/him)
385
386
  * [lukekarrys](https://github.com/lukekarrys) -
@@ -410,7 +411,7 @@ For information about the governance of the Node.js project, see
410
411
  **Filip Skokan** <<panva.ip@gmail.com>> (he/him)
411
412
  * [pimterry](https://github.com/pimterry) -
412
413
  **Tim Perry** <<pimterry@gmail.com>> (he/him)
413
- * [pmarchini](https://github.com/pmarchini)
414
+ * [pmarchini](https://github.com/pmarchini) -
414
415
  **Pietro Marchini** <<pietro.marchini94@gmail.com>> (he/him)
415
416
  * [Qard](https://github.com/Qard) -
416
417
  **Stephen Belanger** <<admin@stephenbelanger.com>> (he/him)
@@ -502,6 +503,8 @@ For information about the governance of the Node.js project, see
502
503
  **Claudio Rodriguez** <<cjrodr@yahoo.com>>
503
504
  * [danbev](https://github.com/danbev) -
504
505
  **Daniel Bevenius** <<daniel.bevenius@gmail.com>> (he/him)
506
+ * [danielleadams](https://github.com/danielleadams) -
507
+ **Danielle Adams** <<adamzdanielle@gmail.com>> (she/her)
505
508
  * [DavidCai1993](https://github.com/DavidCai1993) -
506
509
  **David Cai** <<davidcai1993@yahoo.com>> (he/him)
507
510
  * [davisjam](https://github.com/davisjam) -
@@ -514,7 +517,7 @@ For information about the governance of the Node.js project, see
514
517
  **Hitesh Kanwathirtha** <<digitalinfinity@gmail.com>> (he/him)
515
518
  * [dmabupt](https://github.com/dmabupt) -
516
519
  **Xu Meng** <<dmabupt@gmail.com>> (he/him)
517
- * [dnlup](https://github.com/dnlup)
520
+ * [dnlup](https://github.com/dnlup) -
518
521
  **dnlup** <<dnlup.dev@gmail.com>>
519
522
  * [eljefedelrodeodeljefe](https://github.com/eljefedelrodeodeljefe) -
520
523
  **Robert Jefe Lindstaedt** <<robert.lindstaedt@gmail.com>>
@@ -756,8 +759,6 @@ maintaining the Node.js project.
756
759
  **Mert Can Altin** <<mertgold60@gmail.com>>
757
760
  * [preveen-stack](https://github.com/preveen-stack) -
758
761
  **Preveen Padmanabhan** <<wide4head@gmail.com>> (he/him)
759
- * [RedYetiDev](https://github.com/redyetidev) -
760
- **Aviv Keller** <<redyetidev@gmail.com>> (they/them)
761
762
  * [VoltrexKeyva](https://github.com/VoltrexKeyva) -
762
763
  **Mohammed Keyvanzadeh** <<mohammadkeyvanzade94@gmail.com>> (he/him)
763
764
 
@@ -770,12 +771,6 @@ Primary GPG keys for Node.js Releasers (some Releasers sign with subkeys):
770
771
 
771
772
  * **Antoine du Hamel** <<duhamelantoine1995@gmail.com>>
772
773
  `C0D6248439F1D5604AAFFB4021D900FFDB233756`
773
- * **Beth Griggs** <<bethanyngriggs@gmail.com>>
774
- `4ED778F539E3634C779C87C6D7062848A1AB005C`
775
- * **Bryan English** <<bryan@bryanenglish.com>>
776
- `141F07595B7B3FFE74309A937405533BE57C7D57`
777
- * **Danielle Adams** <<adamzdanielle@gmail.com>>
778
- `74F12602B6F1C4E913FAA37AD3A89613643B6201`
779
774
  * **Juan José Arboleda** <<soyjuanarbol@gmail.com>>
780
775
  `DD792F5973C6DE52C432CBDAC77ABFA00DDBF2B7`
781
776
  * **Marco Ippolito** <<marcoippolito54@gmail.com>>
@@ -796,9 +791,6 @@ to sign releases):
796
791
 
797
792
  ```bash
798
793
  gpg --keyserver hkps://keys.openpgp.org --recv-keys C0D6248439F1D5604AAFFB4021D900FFDB233756 # Antoine du Hamel
799
- gpg --keyserver hkps://keys.openpgp.org --recv-keys 4ED778F539E3634C779C87C6D7062848A1AB005C # Beth Griggs
800
- gpg --keyserver hkps://keys.openpgp.org --recv-keys 141F07595B7B3FFE74309A937405533BE57C7D57 # Bryan English
801
- gpg --keyserver hkps://keys.openpgp.org --recv-keys 74F12602B6F1C4E913FAA37AD3A89613643B6201 # Danielle Adams
802
794
  gpg --keyserver hkps://keys.openpgp.org --recv-keys DD792F5973C6DE52C432CBDAC77ABFA00DDBF2B7 # Juan José Arboleda
803
795
  gpg --keyserver hkps://keys.openpgp.org --recv-keys CC68F5A3106FF448322E48ED27F5E38D5B0A215F # Marco Ippolito
804
796
  gpg --keyserver hkps://keys.openpgp.org --recv-keys 8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 # Michaël Zasso
@@ -815,12 +807,17 @@ verify a downloaded file.
815
807
 
816
808
  <summary>Other keys used to sign some previous releases</summary>
817
809
 
810
+ * **Beth Griggs** <<bethanyngriggs@gmail.com>>
811
+ `4ED778F539E3634C779C87C6D7062848A1AB005C`
812
+ * **Bryan English** <<bryan@bryanenglish.com>>
813
+ `141F07595B7B3FFE74309A937405533BE57C7D57`
818
814
  * **Chris Dickinson** <<christopher.s.dickinson@gmail.com>>
819
815
  `9554F04D7259F04124DE6B476D5A82AC7E37093B`
820
816
  * **Colin Ihrig** <<cjihrig@gmail.com>>
821
817
  `94AE36675C464D64BAFA68DD7434390BDBE9B9C5`
822
818
  * **Danielle Adams** <<adamzdanielle@gmail.com>>
823
819
  `1C050899334244A8AF75E53792EF661D867B9DFA`
820
+ `74F12602B6F1C4E913FAA37AD3A89613643B6201`
824
821
  * **Evan Lucas** <<evanlucas@me.com>>
825
822
  `B9AE9905FFD7803F25714661B63B535A4C206CA9`
826
823
  * **Gibson Fahnestock** <<gibfahn@gmail.com>>
@@ -880,7 +877,7 @@ releases on a rotation basis as outlined in the
880
877
  ## License
881
878
 
882
879
  Node.js is available under the
883
- [MIT license](https://opensource.org/licenses/MIT). Node.js also includes
880
+ [MIT License](https://opensource.org/licenses/MIT). Node.js also includes
884
881
  external libraries that are available under a variety of licenses. See
885
882
  [LICENSE](https://github.com/nodejs/node/blob/HEAD/LICENSE) for the full
886
883
  license text.
package/bin/node CHANGED
Binary file
@@ -36,7 +36,7 @@
36
36
 
37
37
  # Reset this number to 0 on major V8 upgrades.
38
38
  # Increment by one for each non-official patch applied to deps/v8.
39
- 'v8_embedder_string': '-node.21',
39
+ 'v8_embedder_string': '-node.22',
40
40
 
41
41
  ##### V8 defaults for Node.js #####
42
42
 
@@ -19,12 +19,12 @@
19
19
  'force_dynamic_crt': 0,
20
20
  'gas_version': '2.38',
21
21
  'host_arch': 's390x',
22
- 'icu_data_in': '../../deps/icu-tmp/icudt75l.dat',
22
+ 'icu_data_in': '../../deps/icu-tmp/icudt76l.dat',
23
23
  'icu_endianness': 'b',
24
24
  'icu_gyp_path': 'tools/icu/icu-generic.gyp',
25
25
  'icu_path': 'deps/icu-small',
26
26
  'icu_small': 'false',
27
- 'icu_ver_major': '75',
27
+ 'icu_ver_major': '76',
28
28
  'libdir': 'lib',
29
29
  'llvm_version': '0.0',
30
30
  'napi_build_version': '9',
@@ -79,6 +79,7 @@
79
79
  'lib/internal/assert.js',
80
80
  'lib/internal/assert/assertion_error.js',
81
81
  'lib/internal/assert/calltracker.js',
82
+ 'lib/internal/assert/myers_diff.js',
82
83
  'lib/internal/assert/utils.js',
83
84
  'lib/internal/async_context_frame.js',
84
85
  'lib/internal/async_hooks.js',
@@ -204,6 +205,7 @@
204
205
  'lib/internal/modules/helpers.js',
205
206
  'lib/internal/modules/package_json_reader.js',
206
207
  'lib/internal/modules/run_main.js',
208
+ 'lib/internal/modules/typescript.js',
207
209
  'lib/internal/navigator.js',
208
210
  'lib/internal/net.js',
209
211
  'lib/internal/options.js',
@@ -235,6 +237,9 @@
235
237
  'lib/internal/promise_hooks.js',
236
238
  'lib/internal/querystring.js',
237
239
  'lib/internal/quic/quic.js',
240
+ 'lib/internal/quic/state.js',
241
+ 'lib/internal/quic/stats.js',
242
+ 'lib/internal/quic/symbols.js',
238
243
  'lib/internal/readline/callbacks.js',
239
244
  'lib/internal/readline/emitKeypressEvents.js',
240
245
  'lib/internal/readline/interface.js',
@@ -1023,44 +1023,38 @@ NODE_DEPRECATED("Use v8::Date::ValueOf() directly",
1023
1023
  })
1024
1024
  #define NODE_V8_UNIXTIME node::NODE_V8_UNIXTIME
1025
1025
 
1026
- #define NODE_DEFINE_CONSTANT(target, constant) \
1027
- do { \
1028
- v8::Isolate* isolate = target->GetIsolate(); \
1029
- v8::Local<v8::Context> context = isolate->GetCurrentContext(); \
1030
- v8::Local<v8::String> constant_name = \
1031
- v8::String::NewFromUtf8(isolate, #constant, \
1032
- v8::NewStringType::kInternalized).ToLocalChecked(); \
1033
- v8::Local<v8::Number> constant_value = \
1034
- v8::Number::New(isolate, static_cast<double>(constant)); \
1035
- v8::PropertyAttribute constant_attributes = \
1036
- static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete); \
1037
- (target)->DefineOwnProperty(context, \
1038
- constant_name, \
1039
- constant_value, \
1040
- constant_attributes).Check(); \
1041
- } \
1042
- while (0)
1043
-
1044
- #define NODE_DEFINE_HIDDEN_CONSTANT(target, constant) \
1045
- do { \
1046
- v8::Isolate* isolate = target->GetIsolate(); \
1047
- v8::Local<v8::Context> context = isolate->GetCurrentContext(); \
1048
- v8::Local<v8::String> constant_name = \
1049
- v8::String::NewFromUtf8(isolate, #constant, \
1050
- v8::NewStringType::kInternalized) \
1051
- .ToLocalChecked(); \
1052
- v8::Local<v8::Number> constant_value = \
1053
- v8::Number::New(isolate, static_cast<double>(constant)); \
1054
- v8::PropertyAttribute constant_attributes = \
1055
- static_cast<v8::PropertyAttribute>(v8::ReadOnly | \
1056
- v8::DontDelete | \
1057
- v8::DontEnum); \
1058
- (target)->DefineOwnProperty(context, \
1059
- constant_name, \
1060
- constant_value, \
1061
- constant_attributes).Check(); \
1062
- } \
1063
- while (0)
1026
+ #define NODE_DEFINE_CONSTANT(target, constant) \
1027
+ do { \
1028
+ v8::Isolate* isolate = target->GetIsolate(); \
1029
+ v8::Local<v8::Context> context = isolate->GetCurrentContext(); \
1030
+ v8::Local<v8::String> constant_name = v8::String::NewFromUtf8Literal( \
1031
+ isolate, #constant, v8::NewStringType::kInternalized); \
1032
+ v8::Local<v8::Number> constant_value = \
1033
+ v8::Number::New(isolate, static_cast<double>(constant)); \
1034
+ v8::PropertyAttribute constant_attributes = \
1035
+ static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete); \
1036
+ (target) \
1037
+ ->DefineOwnProperty( \
1038
+ context, constant_name, constant_value, constant_attributes) \
1039
+ .Check(); \
1040
+ } while (0)
1041
+
1042
+ #define NODE_DEFINE_HIDDEN_CONSTANT(target, constant) \
1043
+ do { \
1044
+ v8::Isolate* isolate = target->GetIsolate(); \
1045
+ v8::Local<v8::Context> context = isolate->GetCurrentContext(); \
1046
+ v8::Local<v8::String> constant_name = v8::String::NewFromUtf8Literal( \
1047
+ isolate, #constant, v8::NewStringType::kInternalized); \
1048
+ v8::Local<v8::Number> constant_value = \
1049
+ v8::Number::New(isolate, static_cast<double>(constant)); \
1050
+ v8::PropertyAttribute constant_attributes = \
1051
+ static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete | \
1052
+ v8::DontEnum); \
1053
+ (target) \
1054
+ ->DefineOwnProperty( \
1055
+ context, constant_name, constant_value, constant_attributes) \
1056
+ .Check(); \
1057
+ } while (0)
1064
1058
 
1065
1059
  // Used to be a macro, hence the uppercase name.
1066
1060
  inline void NODE_SET_METHOD(v8::Local<v8::Template> recv,
@@ -135,6 +135,18 @@ napi_create_external_buffer(napi_env env,
135
135
  void* finalize_hint,
136
136
  napi_value* result);
137
137
  #endif // NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED
138
+
139
+ #ifdef NAPI_EXPERIMENTAL
140
+ #define NODE_API_EXPERIMENTAL_HAS_CREATE_BUFFER_FROM_ARRAYBUFFER
141
+
142
+ NAPI_EXTERN napi_status NAPI_CDECL
143
+ node_api_create_buffer_from_arraybuffer(napi_env env,
144
+ napi_value arraybuffer,
145
+ size_t byte_offset,
146
+ size_t byte_length,
147
+ napi_value* result);
148
+ #endif // NAPI_EXPERIMENTAL
149
+
138
150
  NAPI_EXTERN napi_status NAPI_CDECL napi_create_buffer_copy(napi_env env,
139
151
  size_t length,
140
152
  const void* data,
@@ -23,7 +23,7 @@
23
23
  #define SRC_NODE_VERSION_H_
24
24
 
25
25
  #define NODE_MAJOR_VERSION 22
26
- #define NODE_MINOR_VERSION 11
26
+ #define NODE_MINOR_VERSION 13
27
27
  #define NODE_PATCH_VERSION 0
28
28
 
29
29
  #define NODE_VERSION_IS_LTS 1
@@ -35,21 +35,7 @@
35
35
  #endif
36
36
 
37
37
  /*
38
- * This file defines data structures for different types of trees:
39
- * splay trees and red-black trees.
40
- *
41
- * A splay tree is a self-organizing data structure. Every operation
42
- * on the tree causes a splay to happen. The splay moves the requested
43
- * node to the root of the tree and partly rebalances it.
44
- *
45
- * This has the benefit that request locality causes faster lookups as
46
- * the requested nodes move to the top of the tree. On the other hand,
47
- * every lookup causes memory writes.
48
- *
49
- * The Balance Theorem bounds the total access time for m operations
50
- * and n inserts on an initially empty tree as O((m + n)lg n). The
51
- * amortized cost for a sequence of m accesses to a splay tree is O(lg n);
52
- *
38
+ * This file defines data structures for red-black trees.
53
39
  * A red-black tree is a binary search tree with the node color as an
54
40
  * extra attribute. It fulfills a set of conditions:
55
41
  * - every search path from the root to a leaf consists of the
@@ -61,239 +47,6 @@
61
47
  * The maximum height of a red-black tree is 2lg (n+1).
62
48
  */
63
49
 
64
- #define SPLAY_HEAD(name, type) \
65
- struct name { \
66
- struct type *sph_root; /* root of the tree */ \
67
- }
68
-
69
- #define SPLAY_INITIALIZER(root) \
70
- { NULL }
71
-
72
- #define SPLAY_INIT(root) do { \
73
- (root)->sph_root = NULL; \
74
- } while (/*CONSTCOND*/ 0)
75
-
76
- #define SPLAY_ENTRY(type) \
77
- struct { \
78
- struct type *spe_left; /* left element */ \
79
- struct type *spe_right; /* right element */ \
80
- }
81
-
82
- #define SPLAY_LEFT(elm, field) (elm)->field.spe_left
83
- #define SPLAY_RIGHT(elm, field) (elm)->field.spe_right
84
- #define SPLAY_ROOT(head) (head)->sph_root
85
- #define SPLAY_EMPTY(head) (SPLAY_ROOT(head) == NULL)
86
-
87
- /* SPLAY_ROTATE_{LEFT,RIGHT} expect that tmp hold SPLAY_{RIGHT,LEFT} */
88
- #define SPLAY_ROTATE_RIGHT(head, tmp, field) do { \
89
- SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(tmp, field); \
90
- SPLAY_RIGHT(tmp, field) = (head)->sph_root; \
91
- (head)->sph_root = tmp; \
92
- } while (/*CONSTCOND*/ 0)
93
-
94
- #define SPLAY_ROTATE_LEFT(head, tmp, field) do { \
95
- SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(tmp, field); \
96
- SPLAY_LEFT(tmp, field) = (head)->sph_root; \
97
- (head)->sph_root = tmp; \
98
- } while (/*CONSTCOND*/ 0)
99
-
100
- #define SPLAY_LINKLEFT(head, tmp, field) do { \
101
- SPLAY_LEFT(tmp, field) = (head)->sph_root; \
102
- tmp = (head)->sph_root; \
103
- (head)->sph_root = SPLAY_LEFT((head)->sph_root, field); \
104
- } while (/*CONSTCOND*/ 0)
105
-
106
- #define SPLAY_LINKRIGHT(head, tmp, field) do { \
107
- SPLAY_RIGHT(tmp, field) = (head)->sph_root; \
108
- tmp = (head)->sph_root; \
109
- (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field); \
110
- } while (/*CONSTCOND*/ 0)
111
-
112
- #define SPLAY_ASSEMBLE(head, node, left, right, field) do { \
113
- SPLAY_RIGHT(left, field) = SPLAY_LEFT((head)->sph_root, field); \
114
- SPLAY_LEFT(right, field) = SPLAY_RIGHT((head)->sph_root, field); \
115
- SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(node, field); \
116
- SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(node, field); \
117
- } while (/*CONSTCOND*/ 0)
118
-
119
- /* Generates prototypes and inline functions */
120
-
121
- #define SPLAY_PROTOTYPE(name, type, field, cmp) \
122
- void name##_SPLAY(struct name *, struct type *); \
123
- void name##_SPLAY_MINMAX(struct name *, int); \
124
- struct type *name##_SPLAY_INSERT(struct name *, struct type *); \
125
- struct type *name##_SPLAY_REMOVE(struct name *, struct type *); \
126
- \
127
- /* Finds the node with the same key as elm */ \
128
- static __inline struct type * \
129
- name##_SPLAY_FIND(struct name *head, struct type *elm) \
130
- { \
131
- if (SPLAY_EMPTY(head)) \
132
- return(NULL); \
133
- name##_SPLAY(head, elm); \
134
- if ((cmp)(elm, (head)->sph_root) == 0) \
135
- return (head->sph_root); \
136
- return (NULL); \
137
- } \
138
- \
139
- static __inline struct type * \
140
- name##_SPLAY_NEXT(struct name *head, struct type *elm) \
141
- { \
142
- name##_SPLAY(head, elm); \
143
- if (SPLAY_RIGHT(elm, field) != NULL) { \
144
- elm = SPLAY_RIGHT(elm, field); \
145
- while (SPLAY_LEFT(elm, field) != NULL) { \
146
- elm = SPLAY_LEFT(elm, field); \
147
- } \
148
- } else \
149
- elm = NULL; \
150
- return (elm); \
151
- } \
152
- \
153
- static __inline struct type * \
154
- name##_SPLAY_MIN_MAX(struct name *head, int val) \
155
- { \
156
- name##_SPLAY_MINMAX(head, val); \
157
- return (SPLAY_ROOT(head)); \
158
- }
159
-
160
- /* Main splay operation.
161
- * Moves node close to the key of elm to top
162
- */
163
- #define SPLAY_GENERATE(name, type, field, cmp) \
164
- struct type * \
165
- name##_SPLAY_INSERT(struct name *head, struct type *elm) \
166
- { \
167
- if (SPLAY_EMPTY(head)) { \
168
- SPLAY_LEFT(elm, field) = SPLAY_RIGHT(elm, field) = NULL; \
169
- } else { \
170
- int __comp; \
171
- name##_SPLAY(head, elm); \
172
- __comp = (cmp)(elm, (head)->sph_root); \
173
- if(__comp < 0) { \
174
- SPLAY_LEFT(elm, field) = SPLAY_LEFT((head)->sph_root, field); \
175
- SPLAY_RIGHT(elm, field) = (head)->sph_root; \
176
- SPLAY_LEFT((head)->sph_root, field) = NULL; \
177
- } else if (__comp > 0) { \
178
- SPLAY_RIGHT(elm, field) = SPLAY_RIGHT((head)->sph_root, field); \
179
- SPLAY_LEFT(elm, field) = (head)->sph_root; \
180
- SPLAY_RIGHT((head)->sph_root, field) = NULL; \
181
- } else \
182
- return ((head)->sph_root); \
183
- } \
184
- (head)->sph_root = (elm); \
185
- return (NULL); \
186
- } \
187
- \
188
- struct type * \
189
- name##_SPLAY_REMOVE(struct name *head, struct type *elm) \
190
- { \
191
- struct type *__tmp; \
192
- if (SPLAY_EMPTY(head)) \
193
- return (NULL); \
194
- name##_SPLAY(head, elm); \
195
- if ((cmp)(elm, (head)->sph_root) == 0) { \
196
- if (SPLAY_LEFT((head)->sph_root, field) == NULL) { \
197
- (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field); \
198
- } else { \
199
- __tmp = SPLAY_RIGHT((head)->sph_root, field); \
200
- (head)->sph_root = SPLAY_LEFT((head)->sph_root, field); \
201
- name##_SPLAY(head, elm); \
202
- SPLAY_RIGHT((head)->sph_root, field) = __tmp; \
203
- } \
204
- return (elm); \
205
- } \
206
- return (NULL); \
207
- } \
208
- \
209
- void \
210
- name##_SPLAY(struct name *head, struct type *elm) \
211
- { \
212
- struct type __node, *__left, *__right, *__tmp; \
213
- int __comp; \
214
- \
215
- SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL; \
216
- __left = __right = &__node; \
217
- \
218
- while ((__comp = (cmp)(elm, (head)->sph_root)) != 0) { \
219
- if (__comp < 0) { \
220
- __tmp = SPLAY_LEFT((head)->sph_root, field); \
221
- if (__tmp == NULL) \
222
- break; \
223
- if ((cmp)(elm, __tmp) < 0){ \
224
- SPLAY_ROTATE_RIGHT(head, __tmp, field); \
225
- if (SPLAY_LEFT((head)->sph_root, field) == NULL) \
226
- break; \
227
- } \
228
- SPLAY_LINKLEFT(head, __right, field); \
229
- } else if (__comp > 0) { \
230
- __tmp = SPLAY_RIGHT((head)->sph_root, field); \
231
- if (__tmp == NULL) \
232
- break; \
233
- if ((cmp)(elm, __tmp) > 0){ \
234
- SPLAY_ROTATE_LEFT(head, __tmp, field); \
235
- if (SPLAY_RIGHT((head)->sph_root, field) == NULL) \
236
- break; \
237
- } \
238
- SPLAY_LINKRIGHT(head, __left, field); \
239
- } \
240
- } \
241
- SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \
242
- } \
243
- \
244
- /* Splay with either the minimum or the maximum element \
245
- * Used to find minimum or maximum element in tree. \
246
- */ \
247
- void name##_SPLAY_MINMAX(struct name *head, int __comp) \
248
- { \
249
- struct type __node, *__left, *__right, *__tmp; \
250
- \
251
- SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL; \
252
- __left = __right = &__node; \
253
- \
254
- for (;;) { \
255
- if (__comp < 0) { \
256
- __tmp = SPLAY_LEFT((head)->sph_root, field); \
257
- if (__tmp == NULL) \
258
- break; \
259
- if (__comp < 0){ \
260
- SPLAY_ROTATE_RIGHT(head, __tmp, field); \
261
- if (SPLAY_LEFT((head)->sph_root, field) == NULL) \
262
- break; \
263
- } \
264
- SPLAY_LINKLEFT(head, __right, field); \
265
- } else if (__comp > 0) { \
266
- __tmp = SPLAY_RIGHT((head)->sph_root, field); \
267
- if (__tmp == NULL) \
268
- break; \
269
- if (__comp > 0) { \
270
- SPLAY_ROTATE_LEFT(head, __tmp, field); \
271
- if (SPLAY_RIGHT((head)->sph_root, field) == NULL) \
272
- break; \
273
- } \
274
- SPLAY_LINKRIGHT(head, __left, field); \
275
- } \
276
- } \
277
- SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \
278
- }
279
-
280
- #define SPLAY_NEGINF -1
281
- #define SPLAY_INF 1
282
-
283
- #define SPLAY_INSERT(name, x, y) name##_SPLAY_INSERT(x, y)
284
- #define SPLAY_REMOVE(name, x, y) name##_SPLAY_REMOVE(x, y)
285
- #define SPLAY_FIND(name, x, y) name##_SPLAY_FIND(x, y)
286
- #define SPLAY_NEXT(name, x, y) name##_SPLAY_NEXT(x, y)
287
- #define SPLAY_MIN(name, x) (SPLAY_EMPTY(x) ? NULL \
288
- : name##_SPLAY_MIN_MAX(x, SPLAY_NEGINF))
289
- #define SPLAY_MAX(name, x) (SPLAY_EMPTY(x) ? NULL \
290
- : name##_SPLAY_MIN_MAX(x, SPLAY_INF))
291
-
292
- #define SPLAY_FOREACH(x, name, head) \
293
- for ((x) = SPLAY_MIN(name, head); \
294
- (x) != NULL; \
295
- (x) = SPLAY_NEXT(name, head, x))
296
-
297
50
  /* Macros that define a red-black tree */
298
51
  #define RB_HEAD(name, type) \
299
52
  struct name { \
@@ -730,8 +483,8 @@ name##_RB_MINMAX(struct name *head, int val) \
730
483
  #define RB_REMOVE(name, x, y) name##_RB_REMOVE(x, y)
731
484
  #define RB_FIND(name, x, y) name##_RB_FIND(x, y)
732
485
  #define RB_NFIND(name, x, y) name##_RB_NFIND(x, y)
733
- #define RB_NEXT(name, x, y) name##_RB_NEXT(y)
734
- #define RB_PREV(name, x, y) name##_RB_PREV(y)
486
+ #define RB_NEXT(name, x) name##_RB_NEXT(x)
487
+ #define RB_PREV(name, x) name##_RB_PREV(x)
735
488
  #define RB_MIN(name, x) name##_RB_MINMAX(x, RB_NEGINF)
736
489
  #define RB_MAX(name, x) name##_RB_MINMAX(x, RB_INF)
737
490
 
@@ -31,8 +31,8 @@
31
31
  */
32
32
 
33
33
  #define UV_VERSION_MAJOR 1
34
- #define UV_VERSION_MINOR 48
35
- #define UV_VERSION_PATCH 0
34
+ #define UV_VERSION_MINOR 49
35
+ #define UV_VERSION_PATCH 2
36
36
  #define UV_VERSION_IS_RELEASE 1
37
37
  #define UV_VERSION_SUFFIX ""
38
38
 
@@ -290,8 +290,8 @@ typedef struct {
290
290
  #define UV_ONCE_INIT { 0, NULL }
291
291
 
292
292
  typedef struct uv_once_s {
293
- unsigned char ran;
294
- HANDLE event;
293
+ unsigned char unused;
294
+ INIT_ONCE init_once;
295
295
  } uv_once_t;
296
296
 
297
297
  /* Platform-specific definitions for uv_spawn support. */