Branch: Tag:


2008-05-29 10:11:16 by Henrik Grubbström (Grubba) <>

Object subtype indexing mega patch.
Added inherit_number argument to the high-level object indexing functions.
Subtyped objects should now be usable in many cases in Pike code.
Updated several modules to the new API.

Rev: src/builtin_functions.c:1.667
Rev: src/interpret.c:1.402
Rev: src/modules/HTTPLoop/requestobject.c:1.32
Rev: src/modules/Image/colors.c:1.76
Rev: src/modules/files/stat.c:1.33
Rev: src/object.c:1.294
Rev: src/object.h:1.97
Rev: src/operators.c:1.233
Rev: src/post_modules/SDL/SDL.cmod:1.30

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: interpret.c,v 1.401 2008/05/12 17:20:20 grubba Exp $ + || $Id: interpret.c,v 1.402 2008/05/29 10:11:14 grubba Exp $   */      #include "global.h"
380:    if (lval[1].type == T_OBJ_INDEX)    low_object_index_no_free (to, lval->u.object, lval[1].u.identifier);    else -  object_index_no_free(to, lval->u.object, lval+1); +  object_index_no_free(to, lval->u.object, lval->subtype, lval+1);    break;       case T_ARRAY:
449:    if (lval[1].type == T_OBJ_INDEX)    object_low_set_index (lval->u.object, lval[1].u.identifier, from);    else -  object_set_index(lval->u.object, lval+1, from); +  object_set_index(lval->u.object, lval->subtype, lval+1, from);    break;       case T_ARRAY:
501:       case T_OBJECT:    /* FIXME: What about object subtypes? */ -  return object_get_item_ptr(lval->u.object,lval+1,t); +  return object_get_item_ptr(lval->u.object, lval->subtype, lval+1, t);       case T_ARRAY:    return array_get_item_ptr(lval->u.array,lval+1,t);