1 #include "symbol.ih"
2 
sy_sp(HashItem * item,bool errOnFailure)3 Stack *sy_sp(HashItem *item, bool errOnFailure)
4 {
5     Stack *sp;
6 
7     if (item == PFAILED)
8     {
9         if (errOnFailure)
10             if (message_show(MSG_ERR))
11                 message("Missing symbol stack");
12         return PFAILED;
13     }
14 
15     if (stack_size(sp = (Stack *)hashitem_value(item)))
16         return sp;
17 
18     if (errOnFailure)
19         if (message_show(MSG_ERR))
20             message("No stacked value for symbol `%s'", hashitem_key(item));
21 
22     return PFAILED;
23 }
24