Skip to main content

endpatternscope

Function endpatternscope 

Source
pub fn endpatternscope()
Expand description

Port of void endpatternscope(void) from Src/pattern.c:4279. Pops the saved bitmap from PATSCOPE_STACK (zpc_disables_stack in C); restores zpc_disables[] from the bitmap ONLY when isset(LOCALPATTERNS) per C c:4286. Called at function exit.

void endpatternscope(void) {
    Zpc_disables_save olddis = zpc_disables_stack;
    zpc_disables_stack = olddis->next;
    if (isset(LOCALPATTERNS))
        restorepatterndisables(olddis->disables);     // c:4287
    zfree(olddis, sizeof(*olddis));
}