[PATCH 2/6] d3dx9_36: Beginning of constants parsing + tests (based on work from Luis Busquets) (try 2)

Henri Verbeet hverbeet at gmail.com
Mon Apr 5 14:01:08 CDT 2010


On 5 April 2010 20:28, Christian Costa <titan.costa at wanadoo.fr> wrote:
> +inline ctab_constant* get_constant(D3DXHANDLE ptr)
> +{
> +    if (!ptr) return NULL;
> +    return (ctab_constant*)~(UINT)ptr;
> +}
> +
> +inline D3DXHANDLE get_handle(ctab_constant* ptr)
> +{
> +    return (D3DXHANDLE)~((UINT)ptr);
> +}
How is that different? You'd have to cast to UINT_PTR to fit a 64-bit
pointer in there, although of course that only works if D3DXHANDLE is
also a 64-bit value on 64-bit Windows (didn't check).



More information about the wine-devel mailing list