summaryrefslogtreecommitdiff
path: root/xtalloc.c
AgeCommit message (Collapse)Author
2010-05-20Add xtalloc_asprintfCarl Worth
I expect this to be useful in the upcoming implementation of token pasting.
2010-05-18Rewrite macro handling to support function-like macro invocation in macro valuesCarl Worth
The rewrite her discards the functions that did direct, recursive expansion of macro values. Instead, the parser now pushes the macro definition string over to a stack of buffers for the lexer. This way, macro expansion gets access to all parsing machinery. This isn't a small change, but the result is simpler than before (I think). It passes the entire test suite, including the four tests added with the previous commit that were failing before.
2010-05-12Convert lexer to talloc and add xtalloc wrappers.Carl Worth
The lexer was previously using strdup (expecting the parser to free), but is now more consistent, easier to use, and slightly more efficent by using talloc along with the parser. Also, we add xtalloc and xtalloc_strdup wrappers around talloc and talloc_strdup to put all of the out-of-memory-checking code in one place.