[Spice-devel] [PATCH 1/6] mingw: use uintptr_t when converting a pointer to an int
Christophe Fergeau
cfergeau at redhat.com
Mon Mar 5 01:19:26 PST 2012
On Sun, Mar 04, 2012 at 03:45:30PM +0200, Uri Lublin wrote:
> On 02/29/2012 08:01 PM, Christophe Fergeau wrote:
> > win64 uses 32 bit long, so we cannot use a long to hold a 64 bit
> > pointer. Thankfully, there's a [u]intptr_t type available exactly
> > for these uses.
> > ---
> > client/canvas.cpp | 2 +-
> > client/cursor.cpp | 2 +-
> > common/draw.h | 4 ++--
> > common/pixman_utils.c | 6 +++---
> > 4 files changed, 7 insertions(+), 7 deletions(-)
> >
> > diff --git a/client/canvas.cpp b/client/canvas.cpp
> > index 139b663..0986d47 100644
> > --- a/client/canvas.cpp
> > +++ b/client/canvas.cpp
> > @@ -70,7 +70,7 @@ void Canvas::clear()
> >
> > void Canvas::begin_draw(SpiceMsgDisplayBase& base, int size, size_t min_size)
> > {
> > - _base = (unsigned long)&base;
> > + _base = (uintptr_t)&base;
> > }
> >
>
> Does Canvas::_base type need to be modified too ?
Indeed, it should be modified. However, looking more at this code, _base in
the various Canvas types is unused as well as _max, so we can remove them.
I'll send a followup patch.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20120305/eb697bce/attachment.pgp>
More information about the Spice-devel
mailing list