Ignore:
Timestamp:
Feb 27, 2009, 5:08:07 AM (16 years ago)
Author:
bird
Message:

kash: malloc/free/friends gets a psh.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kash/nodes.c.pat

    r1233 r2290  
    4545#include "machdep.h"
    4646#include "mystring.h"
     47#include "shinstance.h"
    4748
    4849
     
    6869
    6970union node *
    70 copyfunc(n)
     71copyfunc(psh, n)
     72    struct shinstance *psh;
    7173        union node *n;
    7274{
     
    7678        funcstringsize = 0;
    7779        calcsize(n);
    78         funcblock = ckmalloc(funcblocksize + funcstringsize);
     80        funcblock = ckmalloc(psh, funcblocksize + funcstringsize);
    7981        funcstring = (char *) funcblock + funcblocksize;
    8082        return copynode(n);
     
    159161
    160162void
    161 freefunc(n)
     163freefunc(psh, n)
     164        shinstance *psh;
    162165        union node *n;
    163166{
    164167        if (n)
    165                 ckfree(n);
     168                ckfree(psh, n);
    166169}
Note: See TracChangeset for help on using the changeset viewer.