~cjdahlin/libnih/nih-parse

Viewing all changes in revision 1051.

  • Committer: Casey Dahlin
  • Date: 2010-02-16 23:11:16 UTC
  • Revision ID: cdahlin@redhat.com-20100216231116-k4bg134gpmhjtbsa
* nih/parse.c (NihParseRecursiveFunction): New type for a special class of
functions that simulate recursive semantics without the stack.
(NihParseFrame): New struct for a generic virtual stack frame.
(NihParseSymbolMatchesData): Essentially a global version of the previous
struct frame * inside of nih_parse_symbol_matches.
(NIH_PARSE_OOM_ABORT): Signal OOM for functions using NihParseFrame. Abort the
entire virtual stack.
(NIH_PARSE_POP_FRAME): Conduct a return on an NihParseFrame stack.
(text_pos, text_end): Make these globals for a bit while we move things around.
(nih_parse_symbol_matches): Make this function simply process a virtual
function call with NihParseFrame and return the final result.
(nih_parse_symbol_matches_r): A virtually-recursive function which does what
nih_parse_symbol_matches used to do.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: