Branch: Tag:

2018-03-25

2018-03-25 21:01:21 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Operators: Support cast to subtyped objects.

Casting a non-object value to a subtyped object now causes
the program in the subtype to be cloned with the value as
the single argument.

608:    }       case T_OBJECT: +  { +  struct program *p = program_from_type(type); +  if (p) { +  struct svalue s; +  SET_SVAL(s, T_PROGRAM, 0, program, p); +  apply_svalue(&s, 1); +  return; +  } +  }    switch(TYPEOF(Pike_sp[-1]))    {    case T_STRING: {