Skip to content

Commit

Permalink
src, deps: move string_search.h to nbytes, add version metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
jasnell committed Jun 19, 2024
1 parent 142021a commit 13c8029
Show file tree
Hide file tree
Showing 9 changed files with 685 additions and 682 deletions.
5 changes: 5 additions & 0 deletions deps/nbytes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Node.js bytes (nbytes) library

The `nbytes` library extracts certain Node.js specific byte manipulation
functions from the core of Node.js itself and makes them available for
use in other projects that need to emulate Node.js' behavior.
6 changes: 3 additions & 3 deletions deps/nbytes/nbytes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ bool SwapBytes16(void* data, size_t nbytes) {
for (size_t i = 0; i < len16; i++) {
data16[i] = BSWAP_2(data16[i]);
}
return;
return true;
}
#endif

Expand All @@ -82,7 +82,7 @@ bool SwapBytes32(void* data, size_t nbytes) {
for (size_t i = 0; i < len32; i++) {
data32[i] = BSWAP_4(data32[i]);
}
return;
return true;
}
#endif

Expand All @@ -108,7 +108,7 @@ bool SwapBytes64(void* data, size_t nbytes) {
for (size_t i = 0; i < len64; i++) {
data64[i] = BSWAP_8(data64[i]);
}
return;
return true;
}
#endif

Expand Down
Loading

0 comments on commit 13c8029

Please sign in to comment.