Commit fcd2100
committed
Allow sharing middlesubstring if the terminator is present
Sharing middle substrings have been behind a compilation flags for
a very long time, and it's unclear if we'll ever make it the default.
However, we can still share middle substrings without breaking the
zero-terminated contract if the source string happens to have the
necessary NUL characters at that specific offset.
This is the case for some file formats such as FlatBuffers, BSON keys
and a few others.1 parent 1392600 commit fcd2100
2 files changed
Lines changed: 41 additions & 14 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 | + | |
201 | 210 | | |
202 | 211 | | |
203 | 212 | | |
204 | | - | |
205 | | - | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
206 | 219 | | |
207 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
208 | 223 | | |
209 | | - | |
| 224 | + | |
210 | 225 | | |
211 | 226 | | |
212 | 227 | | |
| |||
2810 | 2825 | | |
2811 | 2826 | | |
2812 | 2827 | | |
2813 | | - | |
2814 | | - | |
2815 | | - | |
2816 | | - | |
2817 | | - | |
2818 | | - | |
2819 | | - | |
2820 | | - | |
2821 | | - | |
2822 | 2828 | | |
2823 | 2829 | | |
2824 | 2830 | | |
| |||
3138 | 3144 | | |
3139 | 3145 | | |
3140 | 3146 | | |
3141 | | - | |
| 3147 | + | |
3142 | 3148 | | |
3143 | 3149 | | |
3144 | 3150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3461 | 3461 | | |
3462 | 3462 | | |
3463 | 3463 | | |
| 3464 | + | |
| 3465 | + | |
| 3466 | + | |
| 3467 | + | |
| 3468 | + | |
| 3469 | + | |
| 3470 | + | |
| 3471 | + | |
| 3472 | + | |
| 3473 | + | |
| 3474 | + | |
| 3475 | + | |
| 3476 | + | |
| 3477 | + | |
| 3478 | + | |
| 3479 | + | |
| 3480 | + | |
| 3481 | + | |
| 3482 | + | |
| 3483 | + | |
| 3484 | + | |
3464 | 3485 | | |
3465 | 3486 | | |
3466 | 3487 | | |
| |||
0 commit comments