Commit 4380362
committed
Don't cast between GinNullCategory and bool
The original idea was that we could use an isNull-style bool array
directly as a GinNullCategory array. However, the existing code already
acknowledges that that doesn't really work, because of the possibility
that bool as currently defined can have arbitrary bit patterns for true
values. So it has to loop through the nullFlags array to set each bool
value to an acceptable value. But if we are looping through the whole
array anyway, we might as well build a proper GinNullCategory array
instead and abandon the type casting. That makes the code much safer in
case bool is ever changed to something else.
Reviewed-by: Michael Paquier <michael.paquier@gmail.com>1 parent 93ea78b commit 4380362
File tree
3 files changed
+21
-23
lines changed- src
- backend/access/gin
- include/access
3 files changed
+21
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
| 298 | + | |
298 | 299 | | |
299 | 300 | | |
300 | 301 | | |
| |||
346 | 347 | | |
347 | 348 | | |
348 | 349 | | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
354 | 353 | | |
355 | | - | |
356 | | - | |
357 | | - | |
| 354 | + | |
| 355 | + | |
358 | 356 | | |
359 | 357 | | |
360 | 358 | | |
361 | 359 | | |
362 | 360 | | |
363 | 361 | | |
364 | 362 | | |
365 | | - | |
| 363 | + | |
366 | 364 | | |
367 | 365 | | |
368 | 366 | | |
369 | 367 | | |
370 | | - | |
371 | 368 | | |
372 | 369 | | |
373 | 370 | | |
374 | 371 | | |
375 | | - | |
| 372 | + | |
376 | 373 | | |
377 | 374 | | |
378 | 375 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
529 | 529 | | |
530 | 530 | | |
531 | 531 | | |
532 | | - | |
533 | | - | |
534 | | - | |
| 532 | + | |
535 | 533 | | |
536 | 534 | | |
537 | 535 | | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | 536 | | |
546 | 537 | | |
547 | 538 | | |
| |||
600 | 591 | | |
601 | 592 | | |
602 | 593 | | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
603 | 601 | | |
604 | 602 | | |
605 | 603 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
192 | | - | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
193 | 196 | | |
194 | 197 | | |
195 | 198 | | |
| |||
0 commit comments