MCPcopy Create free account
hub / github.com/carbonengine/trinity / ParseAlloc

Function ParseAlloc

shadercompiler/lempar.c:363–371  ·  view source on GitHub ↗

** This function allocates a new parser. ** The only argument is a pointer to a function which works like ** malloc. ** ** Inputs: ** A pointer to the function used to allocate memory. ** ** Outputs: ** A pointer to a parser. This pointer is used in subsequent calls ** to Parse and ParseFree. */

Source from the content-addressed store, hash-verified

361** to Parse and ParseFree.
362*/
363void *ParseAlloc(void *(*mallocProc)(YYMALLOCARGTYPE) ParseCTX_PDECL){
364 yyParser *yypParser;
365 yypParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) );
366 if( yypParser ){
367 ParseCTX_STORE
368 ParseInit(yypParser ParseCTX_PARAM);
369 }
370 return (void*)yypParser;
371}
372#endif /* Parse_ENGINEALWAYSONSTACK */
373
374

Callers 1

ParseMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected