[interfacekit] A little binary comp trick

> This should help us quite a bit in tracking down places where we're not
being
> binary compatible.

Maybe it was obvious to everybody, but here is my little trick I use for my
finals testings to insure binary compatibility is fine.

It can't be simpliest. You create an instance of your class, but you give it
to a pointer of the original BeOS class. Then just make a little program
that test every methods and boundaries of that class. If you have a problem
with the binary compatibility, you can be sure to get a crash. Ok it's not
very elegant, but that's working very fine. And for best result, doing it
both way.

By example, with that trick I realized that the _privateData in BString
point 4 bytes higher than the actual data. It's the space used for the
string length, but never documented because used inside the class only.

- Steve




Other related posts: