[openbeosstorage] Re: BDirectory <-> BEntry

On Tue, 9 Apr 2002, Tyler Dauwalder wrote:

> > I would like to turn StorageKit::Dir from DIR* into
> > StorageKit::FileDescriptor or rather directly use file descriptors in
> > BEntry/BDirectory. Only the POSIX API uses DIR*, the R5 VFS API
> > does not. So it actually does not make much sense to have it in our kernel
> > interface.
> 
> Well, yes and no. The reason those typedefs are there were to allow us
> to change to using file descriptors later without changing the interface
> code (excluding the typedefs themselves). But being able to use file
> descriptors all around is even better, so I say go ahead and make the
> switch.

What leaves a bit of a bitter taste when using StorageKit:: types in a 
public header file is, on one hand that you then have to make
kernel_interface.h a public header, too, and on the other hand when
changing the typedef for one of those type you have to be careful with
respect to its sizeof(), because you might change the size of a B* class
instance as an effect.

For comletely SK internal usage I like such `type abstraction'.

CU, Ingo



Other related posts: