pike.git / src / builtin.cmod

version» Context lines:

pike.git/src/builtin.cmod:4674:    *!    *! The base class for serializable objects.    *!    *! Inherit this class in classes that need to be serializable.    *!    *! @seealso    *! @[Serializer.serialize()], @[Serializer.deserialize()]    */   PIKECLASS Serializable   { -  /* Loop over all variables, and call fun_num in the current object. */ +  /* Loop over all true variables, and call fun_num in the current object. */    static void low_serialize(int i, struct svalue *fun,    int use_setter, int fun_num)    {    struct inherit *inh;    struct program *p = Pike_fp->current_object->prog;    struct svalue *save_sp = Pike_sp;       inh = p->inherits + i;    p = inh->prog;       for (i = 0; i < p->num_identifier_references; i++) {    struct reference *ref = PTR_FROM_INT(p, i);    struct identifier *id;    if ((ref->id_flags & ID_HIDDEN) ||    ((ref->id_flags & (ID_PRIVATE|ID_INHERITED)) ==    (ID_PRIVATE|ID_INHERITED))) {    continue;    }    id = ID_FROM_PTR(p, ref); -  if (!IDENTIFIER_IS_VARIABLE(id->identifier_flags)) { +  if (!IDENTIFIER_IS_VARIABLE(id->identifier_flags) || +  (id->run_time_type == PIKE_T_GET_SET)) {    continue;    }    push_svalue(fun);    if (use_setter) {    push_function(get_setter(Pike_fp->current_object,    i + inh->identifier_level),    f_Setter_cq__backtick_28_29_fun_num);    } else {    low_object_index_no_free(Pike_sp, Pike_fp->current_object,    i + inh->identifier_level);