Branch: Tag:

2008-05-29

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

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: colors.c,v 1.75 2005/11/12 20:36:07 nilsson Exp $ + || $Id: colors.c,v 1.76 2008/05/29 10:11:15 grubba Exp $   */      /*
863:    if (args!=1)    Pike_error("Image.Color[]: illegal number of arguments\n");    -  object_index_no_free2(&s,THISOBJ,sp-1); +  object_index_no_free2(&s, THISOBJ, 0, sp-1);    if (s.type==T_INT && sp[-1].type==T_STRING)    {    if (sp[-1].u.string==str_r)
1439:   static void image_colors_index(INT32 args)   {    struct svalue s; -  object_index_no_free2(&s,THISOBJ,sp-1); +  object_index_no_free2(&s, THISOBJ, 0, sp-1);    if (s.type!=T_INT)    {    pop_stack();