nope, I want something like this:
object1: mapping mymapping = ([]);
objectX: mapping myothermapping = object1->mymapping;
objectY: mapping myothermapping = object1->mymapping;
(objects X and Y are of the same class)
But the mappings in objects X and Y are supposed to be initialized to point (reference) to the object1->mymapping in the C code which lives in the create() function of object1 which, in turn, gets an object passed as one of the parameters. The thing is that objects X and Y need to use and/or modify the mapping stored in object1 but they have no idea that the object exists. The C code in object1's create() first checks whether the passed object is of a correct type and then it should retrieve the index of the 'myothermapping' variable and set the svalue so that it references the mymapping mapping. i.e. do the C equivalent of the initialization above.
/ Marek Habersack (Grendel)
Previous text:
2002-09-06 20:47: Subject: Mapping a variable in an object from C
Um, now it seems you're talking about something else. Do you want to catch writes from pike code to a particular field so that you can update some other object with this value? That sounds like a rather strange design, but you should be able to do it by overloading the `[]= operator.
/ Marcus Comstedt (ACROSS) (Hail Ilpalazzo!)