Branch: Tag:

2001-04-28

2001-04-28 19:32:56 by Martin Stjernholm <mast@lysator.liu.se>

Added const-ness to a bunch of functions that doesn't modify the svalues
sent to them. Fixed prototype for the _m_delete lfun.

Rev: src/program.c:1.316
Rev: src/program.h:1.126
Rev: src/svalue.c:1.101
Rev: src/svalue.h:1.89

5:   \*/   /**/   #include "global.h" - RCSID("$Id: program.c,v 1.315 2001/04/24 15:05:04 leif Exp $"); + RCSID("$Id: program.c,v 1.316 2001/04/28 19:32:55 mast Exp $");   #include "program.h"   #include "object.h"   #include "dynamic_buffer.h"
198:    tFuncV(tStr,tVoid,tInt), /* "_is_type", */    tFuncV(tInt tOr(tMap(tStr,tInt),tVoid),tVoid,tStr), /* "_sprintf", */    tFuncV(tMix,tVoid,tInt), /* "_equal", */ -  tFuncV(tMix,tVoid,tMix), /* "_m_delete", */ +  tFuncV(tZero,tVoid,tMix), /* "_m_delete", */    tFuncV(tNone,tVoid,tObj), /* "_get_iterator", */   };   
4763:    return f->u.program;   }    - PMOD_EXPORT struct program *program_from_function(struct svalue *f) + PMOD_EXPORT struct program *program_from_function(const struct svalue *f)   {    struct identifier *id;    if(f->type != T_FUNCTION) return 0;
4772:    return low_program_from_function(f->u.object->prog, f->subtype);   }    - PMOD_EXPORT struct program *program_from_svalue(struct svalue *s) + PMOD_EXPORT struct program *program_from_svalue(const struct svalue *s)   {    switch(s->type)    {