File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -468,17 +468,22 @@ static tokenInfo *newToken (void)
468468 return token ;
469469}
470470
471- static tokenInfo * newTokenFrom (tokenInfo * const token )
471+ static tokenInfo * newTokenFromFull (tokenInfo * const token , bool copyStr )
472472{
473473 tokenInfo * result = xMalloc (1 , tokenInfo );
474474 * result = * token ;
475- result -> string = vStringNewCopy (token -> string );
475+ result -> string = copyStr ? vStringNewCopy (token -> string ): vStringNew ( );
476476 token -> secondary = NULL ;
477477 token -> parentType = NULL ;
478478 token -> signature = NULL ;
479479 return result ;
480480}
481481
482+ static tokenInfo * newTokenFrom (tokenInfo * const token )
483+ {
484+ return newTokenFromFull (token , true);
485+ }
486+
482487static void deleteToken (tokenInfo * const token )
483488{
484489 if (token != NULL )
You can’t perform that action at this time.
0 commit comments