From: Burkhard P. <pl...@ip...> - 2004-10-06 11:06:52
|
> Well the point is that it's not abstract, if we were > forcing the user to access everything directly through > the fields of the structures, every small change in the structure > would mean that every plugin needs to be updated... What needs to be updated? If the priv member isn't renamed, the code must only be recompiled. If the direct accessable members are put at the beginning of the struct and arent't changed, even recompilation isn't necessary. If a stable ABI is desired, you'll need access functions for everything (macros arent't enough). In this case, I would recommend to make the struct completely anonymous (put only a forward declaration in the .h file and the struct definition into the .c file). In this case, gcc will not allow to access any struct members directly from another .c file. -- _____________________________ Dr.-Ing. Burkhard Plaum Institut fuer Plasmaforschung Pfaffenwaldring 31 70569 Stuttgart Tel.: +49 711 685-2187 Fax.: -3102 |