Commit b0df148
[fastapi] Stop using deprecated FastApiTypedArray (nodejs#202)
* [fastapi] Stop using deprecated FastApiTypedArray
* [fastapi] Stop using deprecated FastApiTypedArray
This PR changes the signature of `FastCopy` and `WriteString` to not use
`FastApiTypedArray` anymore. Instead the buffer is received as
`Local<Value>`, and the type check is done in node instead of generated
code.
The data of the buffers is extracted the same as for slow calls. For the
source of `FastCopy` it would also be possible to use the new V8 API
`ArrayBufferView::GetContents()`, but I thought it's better for now to
remain close to the regular implementation. For the other buffers this
API cannot be used because it does not provide write access to the data,
as it copies the data if it's stored on the heap.1 parent 2c185ff commit b0df148
2 files changed
+36
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
46 | 54 | | |
47 | 55 | | |
48 | 56 | | |
| |||
61 | 69 | | |
62 | 70 | | |
63 | 71 | | |
64 | | - | |
65 | 72 | | |
66 | 73 | | |
67 | 74 | | |
| |||
582 | 589 | | |
583 | 590 | | |
584 | 591 | | |
585 | | - | |
586 | | - | |
| 592 | + | |
| 593 | + | |
587 | 594 | | |
588 | 595 | | |
589 | | - | |
590 | | - | |
591 | | - | |
592 | | - | |
593 | | - | |
594 | | - | |
595 | | - | |
596 | | - | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
597 | 601 | | |
| 602 | + | |
598 | 603 | | |
599 | 604 | | |
600 | 605 | | |
| |||
1476 | 1481 | | |
1477 | 1482 | | |
1478 | 1483 | | |
1479 | | - | |
| 1484 | + | |
1480 | 1485 | | |
1481 | 1486 | | |
1482 | | - | |
1483 | | - | |
1484 | | - | |
1485 | | - | |
1486 | | - | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
1487 | 1496 | | |
1488 | 1497 | | |
1489 | 1498 | | |
1490 | 1499 | | |
1491 | 1500 | | |
1492 | | - | |
1493 | | - | |
| 1501 | + | |
| 1502 | + | |
1494 | 1503 | | |
1495 | 1504 | | |
1496 | 1505 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
66 | | - | |
67 | | - | |
| 67 | + | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | | - | |
| 71 | + | |
| 72 | + | |
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
| |||
0 commit comments