winemp3.acm: Avoid using the long type.
Chris Robinson
chris.kcat at gmail.com
Fri May 21 12:57:42 CDT 2010
Now to the list...
On Friday, May 21, 2010 9:32:17 am you wrote:
> Chris Robinson wrote:
> > On Friday, May 21, 2010 3:13:36 am Michael Stefaniuc wrote:
> >> @@ -191,7 +191,7 @@ static void mp3_horse(PACMDRVSTREAMINSTANCE adsi,
> >>
> >> if (ret == MPG123_NEW_FORMAT)
> >> {
> >>
> >> - long rate;
> >> + LONG_PTR rate;
> >>
> >> int channels, enc;
> >> mpg123_getformat(amd->mh, &rate, &channels, &enc);
> >
> > I'm not sure this change is correct, when the function itself is
> > expecting a pointer to an actual long.
>
> Yes, that's why I used LONG_PTR. That's the Win32 way of saying "I want
> a real 'long' like everybody else is using" aka one that has the same
> size as a pointer.
A LONG_PTR is a signed integer large enough to hold a pointer value. A long
may or may not be the same size. This would break if built for 64-bit
Windows, for example, where a long is still 32 bits (and what the 64-bit
Windows version of the lib will expect), while a LONG_PTR is 64 bits.
More information about the wine-devel
mailing list