Ignore:
Timestamp:
Sep 14, 2020, 11:46:32 PM (5 years ago)
Author:
bird
Message:

kash: Use reference counting of parser output in threaded-mode.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kash/parser.c

    r3457 r3458  
    136136        TRACE2((psh, "parsecmd(%d)\n", interact));
    137137#ifdef KASH_SEPARATE_PARSER_ALLOCATOR
    138         pstackpush(psh);
     138        pstackallocpush(psh);
    139139#endif
    140140        psh->tokpushback = 0;
     
    17881788}
    17891789
     1790#ifndef KASH_SEPARATE_PARSER_ALLOCATOR
     1791
    17901792static union node *copyparsetreeint(shinstance *psh, union node *src);
    17911793
     
    19471949}
    19481950
     1951#endif
     1952
    19491953union node *copyparsetree(shinstance *psh, union node *src)
    19501954{
    19511955#ifdef KASH_SEPARATE_PARSER_ALLOCATOR
    1952         pstackpush(psh);
     1956        K_NOREF(psh);
     1957        pstackretainpush(psh, src->pblock);
     1958        return src;
     1959#else
     1960        return copyparsetreeint(psh, src);
    19531961#endif
    1954         return copyparsetreeint(psh, src);
    1955 }
    1956 
     1962}
     1963
Note: See TracChangeset for help on using the changeset viewer.