| 1655 | } |
| 1656 | |
| 1657 | int popscontext() |
| 1658 | { |
| 1659 | ASSERT(contextstack.length() > 0); |
| 1660 | int old = execcontext; |
| 1661 | execcontext = contextstack.pop(); |
| 1662 | currentcontextisolated = contextsealed && contextisolated[execcontext]; |
| 1663 | |
| 1664 | if(execcontext < old && old >= IEXC_MAPCFG) // clean up aliases created in the old (map cfg) context |
| 1665 | { |
| 1666 | int limitcontext = max(execcontext + 1, (int) IEXC_MAPCFG); // don't clean up below IEXC_MAPCFG |
| 1667 | enumeratekt(*idents, const char *, name, ident, id, |
| 1668 | { |
| 1669 | if(id.type == ID_ALIAS && id.context >= limitcontext) |
| 1670 | { |
| 1671 | while(id.stack && id.stack->context >= limitcontext) |
| 1672 | popident(id); |
| 1673 | if(id.context >= limitcontext) |
| 1674 | { |
| 1675 | if(id.action != id.executing) delete[] id.action; |
| 1676 | idents->remove(name); |
| 1677 | } |
| 1678 | } |
| 1679 | }); |
| 1680 | } |
| 1681 | return execcontext; |
| 1682 | } |
| 1683 | |
| 1684 | #ifndef STANDALONE |
| 1685 | void scriptcontext(char *context, char *idname) |
no test coverage detected