In message <[EMAIL PROTECTED]>
          Simon Cozens <[EMAIL PROTECTED]> wrote:

> I've now changed the vtable structure to reflect this, but I'd like someone
> to confirm that the "variant" forms of the ops can be addressed the way I
> think they can. (ie. structure->base_element + 1 to get "thing after
> base_element")

Legally speaking they can't as ISO C says that you can't do pointer
calculations and comparisons across object boundaries and separate
members of a structure are different objects. If you replace this:

        set_integer_method_t set_integer_1;
        set_integer_method_t set_integer_2;
        set_integer_method_t set_integer_3;
        set_integer_method_t set_integer_4;
        set_integer_method_t set_integer_5;

with this:

        set_integer_method_t set_integer[5];

then you would be able to, as an array is all one object.

Practically speaking I think it will work on every system that I can
think of at the moment but who knows what wierd things are out there...

Tom

-- 
Tom Hughes ([EMAIL PROTECTED])
http://www.compton.nu/

Reply via email to