winemp3.acm: Avoid using the long type.
mstefani at redhat.com
Fri May 21 13:59:40 CDT 2010
On 05/21/2010 07:57 PM, Chris Robinson wrote:
> 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;
>>> 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.
mpg123_getformat() is a host native lib aka a unix lib thus expects a
"unix long". A "unix long" translates to LONG_PTR in Wine. My patch is
actually a no-op.
More information about the wine-devel