On Tue, Jul 25, 2006 at 01:21:44PM +0200, Goswin von Brederlow wrote:
> Wouter Verhelst <[EMAIL PROTECTED]> writes:
> > tags 339344 - patch
> > thanks
> >
> > On Mon, Jul 17, 2006 at 09:56:10AM +0200, Goswin Brederlow wrote:
> >> Package: belpic
> >> Followup-For: Bug #339344
> >> 
> >> Hi,
> >> 
> >> attached is a patch for the pointer conversion error.
> >
> > It doesn't actually work, though; you can't change the definition of a
> > class which is rather central in the entire class hierarchy and hope
> > that things still compile. Also, this implies an API change, which is a
> > Very Bad Thing(TM).
> 
> Worked fine here on amd64. What error do you get?

The exact reverse of what you got on amd64 without the fix.

Unfixed, the code assumed that size_t == unsigned int, and that one cast
broke on architectures where this is not true.

Your "fix" basically assumed that size_t == unsigned long (the code
refers to that modified data later on as size_t anyway). It also
happened to change the ABI (not just the API) of the library, which
would have required me to do a SONAME bump (the function was part of an
abstract class, and many child classes reimplement it).

> > The right fix is simpler: rather than trying to cast unsigned long to
> > unsigned int, one should cast unsigned long to size_t (which happens to
> > be the same thing on 32bit architectures, but nowhere else).
> 
> That isn't right. That might just be working on the relevant systems.

Sorry, after looking at the code for over three hours, I came to the
conclusion that it is. Please check the patch and prove to me that it is
wrong, or it will stay the way it is now.

-- 
Fun will now commence
  -- Seven Of Nine, "Ashes to Ashes", stardate 53679.4


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to