Commit e59ce66
module: Strict per-modname namespaces
Hi,
I've been wanting $topic for a while, and having just stumbled into the
whole namespace thing by accident, I figured I'd give it a go, most if
the hard parts seem to have already been done.
It reserves and disallows imports on any "MODULE_${name}" namespace,
while it implicitly adds the same namespace to every module.
This allows exports targeted at specific modules and no others -- one
random example included. I've hated the various kvm exports we've had
for a while, and strictly limiting them to the kvm module helps
alleviate some abuse potential.1 parent 32ccd9d commit e59ce66
3 files changed
Lines changed: 47 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
369 | | - | |
| 369 | + | |
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1102 | 1102 | | |
1103 | 1103 | | |
1104 | 1104 | | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
1105 | 1112 | | |
1106 | 1113 | | |
1107 | 1114 | | |
| |||
1645 | 1652 | | |
1646 | 1653 | | |
1647 | 1654 | | |
1648 | | - | |
| 1655 | + | |
1649 | 1656 | | |
1650 | 1657 | | |
| 1658 | + | |
1651 | 1659 | | |
1652 | 1660 | | |
1653 | 1661 | | |
1654 | 1662 | | |
1655 | 1663 | | |
1656 | 1664 | | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
1657 | 1679 | | |
1658 | 1680 | | |
1659 | 1681 | | |
| |||
3210 | 3232 | | |
3211 | 3233 | | |
3212 | 3234 | | |
3213 | | - | |
| 3235 | + | |
| 3236 | + | |
| 3237 | + | |
3214 | 3238 | | |
3215 | 3239 | | |
3216 | 3240 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1553 | 1553 | | |
1554 | 1554 | | |
1555 | 1555 | | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
1556 | 1566 | | |
1557 | 1567 | | |
| 1568 | + | |
1558 | 1569 | | |
1559 | 1570 | | |
1560 | 1571 | | |
| |||
1586 | 1597 | | |
1587 | 1598 | | |
1588 | 1599 | | |
1589 | | - | |
1590 | | - | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
1591 | 1605 | | |
1592 | | - | |
1593 | | - | |
1594 | 1606 | | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
1595 | 1610 | | |
1596 | 1611 | | |
1597 | 1612 | | |
| |||
1700 | 1715 | | |
1701 | 1716 | | |
1702 | 1717 | | |
1703 | | - | |
1704 | | - | |
1705 | | - | |
1706 | | - | |
1707 | | - | |
| 1718 | + | |
1708 | 1719 | | |
1709 | 1720 | | |
1710 | 1721 | | |
| |||
0 commit comments