Ticket #892 (closed RFC: fixed)
PARROT_IN_OBJECTS_C used only in one file
|Reported by:||NotFound||Owned by:|
In include/parrot/vtable.h there is conditional block undef #ifdef PARROT_IN_OBJECTS_C
PARROT_IN_OBJECTS_C is defined only in src/oo.c, and also in src/pmc/class.pmc, but that last usage is wrong. Looking at the generated class.c code, the define is done longer after vtable.h has been included. Deleting it has no effect.
The only real usage is in src/oo.c, then. The definitions inside the vtable.h block are the PARROT_VTABLE_LOW and NUM_VTABLE_FUNCTIONS macros, and the array Parrot_vtable_slot_names. ack'ing for these symbols, they are used only in oo.c, and mentioned in few comments elsewhere. The other practical usages of the PARROT_VTABLE_LOW value ( 9 ) are handled by the code generators and C doesn't see it.
So I suggest to move that definitions to another file, to avoid having that confusing conditional in such an important header.