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

kash: malloc/free/friends gets a psh.

Location:
trunk/src/kash/generated
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kash/generated/init.c

    r1239 r2290  
    189189              psh->out2 = &psh->errout;
    190190              if (psh->memout.buf != NULL) {
    191                       ckfree(psh->memout.buf);
     191                      ckfree(psh, psh->memout.buf);
    192192                      psh->memout.buf = NULL;
    193193              }
  • trunk/src/kash/generated/nodes.c

    r1233 r2290  
    4949#include "machdep.h"
    5050#include "mystring.h"
     51#include "shinstance.h"
    5152
    5253
     
    99100
    100101union node *
    101 copyfunc(n)
     102copyfunc(psh, n)
     103    struct shinstance *psh;
    102104        union node *n;
    103105{
     
    107109        funcstringsize = 0;
    108110        calcsize(n);
    109         funcblock = ckmalloc(funcblocksize + funcstringsize);
     111        funcblock = ckmalloc(psh, funcblocksize + funcstringsize);
    110112        funcstring = (char *) funcblock + funcblocksize;
    111113        return copynode(n);
     
    340342
    341343void
    342 freefunc(n)
     344freefunc(psh, n)
     345    shinstance *psh;
    343346        union node *n;
    344347{
    345348        if (n)
    346                 ckfree(n);
    347 }
     349                ckfree(psh, n);
     350}
  • trunk/src/kash/generated/nodes.h

    r1233 r2290  
    156156
    157157
    158 union node *copyfunc(union node *);
    159 void freefunc(union node *);
     158union node *copyfunc(struct shinstance *, union node *);
     159void freefunc(struct shinstance *, union node *);
Note: See TracChangeset for help on using the changeset viewer.