Commit b84af20
committed
Merge namespace validators into one validateNamespace(allow_root=)
validateScopeNamespace and validateDestroyNamespace differed only in whether
the root (length-0) namespace is allowed -- the apparent leniency of the scope
validator was illusory (numeric/multi-element namespaces crashed cryptically
downstream rather than being permitted). Collapse them into a single
validateNamespace(namespace, allow_root) helper: makeScope() passes
allow_root = TRUE, the destroy paths use the default. As a side benefit,
malformed makeScope() namespaces now get the clean validation error instead of
a cryptic fastmap/if-length crash.1 parent 5617f5b commit b84af20
2 files changed
Lines changed: 16 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
340 | | - | |
| 340 | + | |
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
| |||
554 | 554 | | |
555 | 555 | | |
556 | 556 | | |
557 | | - | |
| 557 | + | |
558 | 558 | | |
559 | 559 | | |
560 | 560 | | |
| |||
586 | 586 | | |
587 | 587 | | |
588 | 588 | | |
589 | | - | |
| 589 | + | |
590 | 590 | | |
591 | 591 | | |
592 | 592 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
445 | 445 | | |
446 | 446 | | |
447 | 447 | | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
452 | 457 | | |
453 | 458 | | |
454 | 459 | | |
455 | 460 | | |
456 | | - | |
| 461 | + | |
457 | 462 | | |
458 | 463 | | |
459 | 464 | | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | 465 | | |
468 | 466 | | |
469 | 467 | | |
470 | 468 | | |
471 | 469 | | |
472 | 470 | | |
473 | 471 | | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | 472 | | |
481 | 473 | | |
482 | 474 | | |
| |||
1044 | 1036 | | |
1045 | 1037 | | |
1046 | 1038 | | |
1047 | | - | |
| 1039 | + | |
1048 | 1040 | | |
1049 | 1041 | | |
1050 | 1042 | | |
| |||
1126 | 1118 | | |
1127 | 1119 | | |
1128 | 1120 | | |
1129 | | - | |
| 1121 | + | |
1130 | 1122 | | |
1131 | 1123 | | |
1132 | 1124 | | |
| |||
1334 | 1326 | | |
1335 | 1327 | | |
1336 | 1328 | | |
1337 | | - | |
| 1329 | + | |
1338 | 1330 | | |
1339 | 1331 | | |
1340 | 1332 | | |
| |||
0 commit comments