oleaut32: Constify some variables
Marcus Meissner
marcus at jet.franken.de
Mon Jul 30 15:52:44 CDT 2007
On Mon, Jul 30, 2007 at 09:27:45PM +0100, Andrew Talbot wrote:
> Changelog:
> oleaut32: Constify some variables.
>
> diff -urN a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
> --- a/dlls/oleaut32/typelib.c 2007-07-30 17:23:19.000000000 +0100
> +++ b/dlls/oleaut32/typelib.c 2007-07-30 21:23:13.000000000 +0100
> @@ -147,7 +147,7 @@
> /*
> * Find a typelib key which matches a requested maj.min version.
> */
> -static BOOL find_typelib_key( REFGUID guid, WORD wMaj, WORD *wMin )
> +static BOOL find_typelib_key( REFGUID guid, const WORD *wMaj, WORD *wMin )
> {
> static const WCHAR typelibW[] = {'T','y','p','e','l','i','b','\\',0};
> WCHAR buffer[60];
> @@ -172,7 +172,7 @@
> {
> TRACE("found %s: %x.%x\n", debugstr_w(buffer), v_maj, v_min);
>
> - if (wMaj == v_maj)
> + if (*wMaj == v_maj)
> {
> if (*wMin == v_min)
> {
> @@ -274,7 +274,7 @@
>
> TRACE_(typelib)("(%s, %x.%x, 0x%x, %p)\n", debugstr_guid(guid), wMaj, wMin, lcid, path);
>
> - if (!find_typelib_key( guid, wMaj, &wMin )) return TYPE_E_LIBNOTREGISTERED;
> + if (!find_typelib_key( guid, &wMaj, &wMin )) return TYPE_E_LIBNOTREGISTERED;
> get_typelib_key( guid, wMaj, wMin, buffer );
Alexandre committed a fixed version of this part of the patch already. See:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=36720b4945f90896379e7af9dfea2b9a7a214cb9
The const fixup is no longer necessary, since the value now gets passed
as argument and not as pointer.
The rest might be necessary.
Ciao, Marcus
More information about the wine-devel
mailing list