Skip to main content

freealiasnode

Function freealiasnode 

Source
pub fn freealiasnode(hn: &str)
Expand description

Port of createaliasnode(char *txt, int flags) from Src/hashtable.c:1230.

C body:

al = zshcalloc(sizeof *al);
al->node.flags = flags;
al->text = txt;
al->inuse = 0;
return al;

Port of freealiasnode(HashNode hn) from Src/hashtable.c:1243.

C body frees the name + text strings + alias struct. Rust port: drop runs the same when the crate::ported::zsh_h::alias is removed from its table. This helper triggers the drop.