Macro libyml::STACK_EMPTY

source ·
macro_rules! STACK_EMPTY {
    ($stack:expr) => { ... };
}
Expand description

Checks if the stack has no elements.

This macro checks if the stack has no elements by comparing the start and top pointers. If the start and top pointers are equal, it means the stack is empty and the function returns true. Otherwise, it means the stack has elements and the function returns false.

§Parameters

  • stack: A mutable reference to the stack to be checked.

§Return

  • true if the stack is empty, i.e., the start and top pointers are equal.
  • false if the stack is not empty, i.e., the start and top pointers are not equal.