PATCH: hglobalstream static

Dmitry Timoshkov dmitry at baikal.ru
Mon May 16 01:29:04 CDT 2005


"Marcus Meissner" <marcus at jet.franken.de> wrote:

>  /***
> + * This implements the IUnknown method AddRef for this
> + * class
> + */
> +static ULONG WINAPI HGLOBALStreamImpl_AddRef(
> + IStream* iface)
> +{
> +  HGLOBALStreamImpl* const This=(HGLOBALStreamImpl*)iface;
> +  return InterlockedIncrement(&This->ref);
> +}

I understand that this is an existing code, but calling InterlockedIncrement
for a 'const' pointer looks very suspicious. Same for HGLOBALStreamImpl_Release,
HGLOBALStreamImpl_Read and other interfaces which actually change the pointed
data.

-- 
Dmitry.




More information about the wine-devel mailing list