Skip to main content

removeshfuncnode

Function removeshfuncnode 

Source
pub fn removeshfuncnode(nam: &str) -> Option<shfunc>
Expand description

Port of removeshfuncnode(UNUSED(HashTable ht), const char *nam) from Src/hashtable.c:836.

C body:

if (!strncmp(nam, "TRAP", 4) && (sigidx = getsigidx(nam + 4)) != -1)
    hn = removetrap(sigidx);
else
    hn = removehashnode(shfunctab, nam);
return hn;

Drops the named function from shfunctab. If the name is a TRAP<sig> form, also clears the trap via signals.rs. Returns the removed function (or None if absent). WARNING: param names don’t match C — Rust=(nam) vs C=(ht, nam)