pike.git / src / svalue.c

version» Context lines:

pike.git/src/svalue.c:275:   PMOD_EXPORT TYPE_FIELD assign_svalues(struct svalue *to,    const struct svalue *from,    size_t num,    TYPE_FIELD type_hint)   {    check_type_hint (from, num, type_hint);    if (type_hint & BIT_REF_TYPES) free_mixed_svalues(to,num);    return assign_svalues_no_free(to,from,num,type_hint);   }    + PMOD_EXPORT void assign_no_ref_svalue(struct svalue *to, +  const struct svalue *val, +  const struct object *owner) + { +  if (((TYPEOF(*to) != PIKE_T_OBJECT) && +  (TYPEOF(*to) != PIKE_T_FUNCTION)) || +  (to->u.object != owner)) { +  free_svalue(to); +  } +  if (val) { +  if (((TYPEOF(*val) != PIKE_T_OBJECT) && +  (TYPEOF(*val) != PIKE_T_FUNCTION)) || +  (val->u.object != owner)) { +  assign_svalue_no_free(to, val); +  } else { +  *to = *val; +  } +  } else { +  SET_SVAL(*to, PIKE_T_INT, NUMBER_UNDEFINED, integer, 0); +  } + } +    PMOD_EXPORT void assign_to_short_svalue(union anything *u,    TYPE_T type,    const struct svalue *s)   {    check_svalue_type (s);    check_refs(s);       if(TYPEOF(*s) == type)    {    switch(type)