Skip to content

Commit 13c8029

Browse files
committed
src, deps: move string_search.h to nbytes, add version metadata
1 parent 142021a commit 13c8029

File tree

9 files changed

+685
-682
lines changed

9 files changed

+685
-682
lines changed

deps/nbytes/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Node.js bytes (nbytes) library
2+
3+
The `nbytes` library extracts certain Node.js specific byte manipulation
4+
functions from the core of Node.js itself and makes them available for
5+
use in other projects that need to emulate Node.js' behavior.

deps/nbytes/nbytes.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ bool SwapBytes16(void* data, size_t nbytes) {
5656
for (size_t i = 0; i < len16; i++) {
5757
data16[i] = BSWAP_2(data16[i]);
5858
}
59-
return;
59+
return true;
6060
}
6161
#endif
6262

@@ -82,7 +82,7 @@ bool SwapBytes32(void* data, size_t nbytes) {
8282
for (size_t i = 0; i < len32; i++) {
8383
data32[i] = BSWAP_4(data32[i]);
8484
}
85-
return;
85+
return true;
8686
}
8787
#endif
8888

@@ -108,7 +108,7 @@ bool SwapBytes64(void* data, size_t nbytes) {
108108
for (size_t i = 0; i < len64; i++) {
109109
data64[i] = BSWAP_8(data64[i]);
110110
}
111-
return;
111+
return true;
112112
}
113113
#endif
114114

0 commit comments

Comments
 (0)