
|
[openbeos]
||
[Date Prev]
[12-2001 Date Index]
[Date Next]
||
[Thread Prev]
[12-2001 Thread Index]
[Thread Next]
[openbeos] binary compatibility und FBC problem
- From: "Marcus Overhagen" <dos4gw@xxxxxx>
- To: openbeos@xxxxxxxxxxxxx
- Date: Tue, 4 Dec 2001 14:44:25 +0100
Hello,
I would like to straighten out some facts about the FBC problem and binary
compatibility.
First: Yes, it is possible to change class headers, for example by adding new
functions,
or by removing functions from the private: section without breaking
functionality,
as long as these functions are not virtual.
You can also add your own variables, but you have to make sure you don't break
the FBC layout.
This means, you are not allowed to change:
* The size of objects (i.e. structs or classes)
* The offsets to "visible" (public or protected) data
* The existence and size of the vtable
* The offsets to the virtual functions in the vtable
In other words:
If there are any variables that are public or protected, they may be used
by applications and can't be changed. You are also not allowed to change
their position, for example by reordering. But you can add or romve variables
in the private: section, if you make sure that the size of the class stays
the same. Adding a
void * mydata;
forces you to remove 4 bytes of data elsewhere, for eample by reducing
the uint32 reseved[x]; and replacing x with x -1.
Order and positions of virtual functions can not change, and you also
can't change the amount of virtual functions.
There is also a (very old) newsletter about this, it explains this much more
and in very detail, I think it's a must read for everyone involved here.
please find it here:
http://www-classic.be.com/aboutbe/benewsletter/Issue79.html#Insight
regards
Marcus
|

|