bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Parted 1.5.6-pre1


From: Andrew Clausen
Subject: Re: Parted 1.5.6-pre1
Date: Thu, 3 Jan 2002 01:18:47 +1100
User-agent: Mutt/1.2.5i

On Tue, Jan 01, 2002 at 09:01:27PM +0100, Neal H Walfield wrote:
> > Change summary:
> > * I've added a bit of #ifdef mess, to make libparted small
> > in the case of only wanting to parse partition tables.
> 
> This is the wrong thing to do: you should separate the routines and
> minimize the dependencies of one .o on another.  Then, when you link,
> the amount of actual code brought in to the application will be
> minimal.  Anything else is a hack.

I agree this is a hack.

However, C is really crap at doing this kind of thing.
It doesn't know what a vtable is, and can't deduce that since
ped_file_system_resize isn't called, fat_resize isn't either.

I can't see any clean way of getting polymorphism and small code.
(Hence I'm doing it this way).

To literally apply what you're saying, I'd have to seperate
PedDiskOps, PedFileSystemOps, etc. which I think is even uglier.

Andrew




reply via email to

[Prev in Thread] Current Thread [Next in Thread]