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

Re: [d-i] libdebian-installer2

[Michael Cardenas]
> Isn't it true that you can only safely add onto the end of a struct
> on i386? Since the stack is allocated backwards on ppc, wouldn't
> adding to the end of the struct still break old clients?

No.  If the library clients never allocates or uses the struct content
directly, and all access to the struct is done using the library,
there are no limits on how you can restructure the content of a
struct.  Think encapsulation. :-)

IF the client allocates the struct on the stack, there is no way you
can safely modify the struct content.

"The Practice of Programming" by Brian Kernighan and Rob Pike is a
nice book to read about interface design.

Reply to: