Branch: Tag:

2011-10-28

2011-10-28 13:04:55 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Atomic megapatch: Use svalue accessor macros everywhere.

35:   {    struct svalue s;    -  s.type=T_STRING; -  s.subtype=0; -  s.u.string=name; +  SET_SVAL(s, T_STRING, 0, string, name);       if(fun)    {
67:   PMOD_EXPORT void add_global_program(const char *name, struct program *p)   {    struct svalue s; -  s.type=T_PROGRAM; -  s.subtype=0; -  s.u.program=p; +  SET_SVAL(s, T_PROGRAM, 0, program, p);    low_add_constant(name, p?&s:NULL);   }   
151:    struct callable *ret;       n=make_shared_string(name); -  s.type=T_FUNCTION; -  s.subtype=FUNCTION_BUILTIN; -  ret=s.u.efun=make_callable(fun, name, type, flags, optimize, docode); +  SET_SVAL(s, T_FUNCTION, FUNCTION_BUILTIN, efun, +  make_callable(fun, name, type, flags, optimize, docode));    low_add_efun(n, &s);    free_svalue(&s);    free_string(n);
187: Inside #if defined(DEBUG)
  #ifdef DEBUG    check_type_string(t);   #endif -  s.type=T_FUNCTION; -  s.subtype=FUNCTION_BUILTIN; +     add_ref(n); -  ret=s.u.efun=low_make_callable(fun, n, t, flags, optimize, docode); +  SET_SVAL(s, T_FUNCTION, FUNCTION_BUILTIN, efun, +  ret = low_make_callable(fun, n, t, flags, optimize, docode));    mapping_string_insert(builtin_constants, n, &s);    free_svalue(&s);    free_string(n);