diff options
| author | Charles.Forsyth <devnull@localhost> | 2009-02-02 10:36:32 +0000 |
|---|---|---|
| committer | Charles.Forsyth <devnull@localhost> | 2009-02-02 10:36:32 +0000 |
| commit | a6e29a60e56f492175fa2f70df61dbdaaff98b2a (patch) | |
| tree | 5ea7ca7a9e9453a5f02b7a92e486dfb17f0e2664 /libinterp/xec.c | |
| parent | 857aba0441b20ad666243e0a21fa48ebd264008f (diff) | |
20090102-1036
Diffstat (limited to 'libinterp/xec.c')
| -rw-r--r-- | libinterp/xec.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/libinterp/xec.c b/libinterp/xec.c index 9f6792e9..29778c0b 100644 --- a/libinterp/xec.c +++ b/libinterp/xec.c @@ -455,8 +455,8 @@ cnewc(Type *t, void (*mover)(void), int len) h = heap(&Tchannel); c = H2D(Channel*, h); - c->send = (Progq*)malloc(sizeof(Progq)); - c->recv = (Progq*)malloc(sizeof(Progq)); + c->send = malloc(sizeof(Progq)); + c->recv = malloc(sizeof(Progq)); if(c->send == nil || c->recv == nil){ free(c->send); free(c->recv); @@ -722,6 +722,7 @@ OP(iload) Import *ldt; Module *m; Modlink *ml, **mp, *t; + Heap *h; n = string2c(S(s)); m = R.M->m; @@ -737,7 +738,9 @@ OP(iload) ml = linkmod(m, ldt, 0); if(ml != H) { ml->MP = R.M->MP; - D2H(ml->MP)->ref++; + h = D2H(ml->MP); + h->ref++; + Setmark(h); } } else { @@ -1560,9 +1563,12 @@ OP(cvtxf) OP(self) { Modlink *ml, **mp, *t; + Heap *h; ml = R.M; - D2H(ml)->ref++; + h = D2H(ml); + h->ref++; + Setmark(h); mp = R.d; t = *mp; *mp = ml; |
