Commit 7e18f2e
src: add BE support to StringBytes::Encode()
Versions of Node.js after v0.12 have relocated byte-swapping away from
the StringBytes::Encode function, thereby causing a nan test (which
accesses this function directly) to fail on big-endian machines.
This change re-introduces byte swapping in StringBytes::Encode,
done via a call to a function in util-inl. Another change in
NodeBuffer::StringSlice was necessary to avoid double byte swapping
in big-endian function calls to StringSlice.
PR-URL: #3410
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>1 parent 1fe4d30 commit 7e18f2eCopy full SHA for 7e18f2e
File tree
Expand file treeCollapse file tree
4 files changed
+34
-7
lines changedOpen diff view settings
Filter options
- src
Expand file treeCollapse file tree
4 files changed
+34
-7
lines changedOpen diff view settings
Collapse file
+6-3Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
477 | 477 | |
478 | 478 | |
479 | 479 | |
480 | | - |
481 | | - |
482 | | - |
| 480 | + |
483 | 481 | |
| 482 | + |
| 483 | + |
| 484 | + |
484 | 485 | |
485 | 486 | |
486 | 487 | |
| ||
490 | 491 | |
491 | 492 | |
492 | 493 | |
| 494 | + |
| 495 | + |
493 | 496 | |
494 | 497 | |
495 | 498 | |
|
Collapse file
+12-4Lines changed: 12 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
6 | 6 | |
7 | 7 | |
8 | 8 | |
| 9 | + |
9 | 10 | |
10 | 11 | |
11 | 12 | |
| ||
406 | 407 | |
407 | 408 | |
408 | 409 | |
409 | | - |
410 | | - |
411 | | - |
| 410 | + |
412 | 411 | |
413 | 412 | |
414 | 413 | |
| ||
857 | 856 | |
858 | 857 | |
859 | 858 | |
860 | | - |
| 859 | + |
| 860 | + |
| 861 | + |
| 862 | + |
| 863 | + |
| 864 | + |
| 865 | + |
| 866 | + |
| 867 | + |
| 868 | + |
861 | 869 | |
862 | 870 | |
863 | 871 | |
|
Collapse file
+14Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
198 | 198 | |
199 | 199 | |
200 | 200 | |
| 201 | + |
| 202 | + |
| 203 | + |
| 204 | + |
| 205 | + |
| 206 | + |
| 207 | + |
| 208 | + |
| 209 | + |
| 210 | + |
| 211 | + |
| 212 | + |
| 213 | + |
| 214 | + |
201 | 215 | |
202 | 216 | |
203 | 217 | |
Collapse file
+2Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
176 | 176 | |
177 | 177 | |
178 | 178 | |
| 179 | + |
| 180 | + |
179 | 181 | |
180 | 182 | |
181 | 183 | |
|
0 commit comments