* lib/xlib: fix invalid pointer-int casts.

git-svn-id: svn://svn.zoy.org/elk/trunk@270 55e467fa-43c5-0310-a8a2-de718669efc6
This commit is contained in:
sam 2006-09-17 10:46:09 +00:00
parent 44a8ef8d52
commit 51d8ac2837
3 changed files with 4 additions and 3 deletions

View File

@ -37,7 +37,7 @@ static int Color_Equal (Object x, Object y) {
return p->red == q->red && p->green == q->green && p->blue == q->blue;
}
Generic_Print (Color, "#[color %lu]", POINTER(x))
Generic_Print (Color, "#[color %lu]", (unsigned int)(uintptr_t)POINTER(x))
Object Make_Color (unsigned int r, unsigned int g, unsigned int b) {
Object c;

View File

@ -43,7 +43,8 @@ Generic_Equal (Display, DISPLAY, dpy)
static int Display_Print (Object d, Object port,
int raw, int depth, int length) {
Printf (port, "#[display %lu %s]", (unsigned)DISPLAY(d)->dpy,
Printf (port, "#[display %lu %s]",
(unsigned long)(uintptr_t)DISPLAY(d)->dpy,
DisplayString (DISPLAY(d)->dpy));
return 0;
}

View File

@ -36,7 +36,7 @@ Generic_Predicate (Gc)
Generic_Equal_Dpy (Gc, GCONTEXT, gc)
Generic_Print (Gc, "#[gcontext %lu]", GCONTEXT(x)->gc)
Generic_Print (Gc, "#[gcontext %lu]", (unsigned int)(uintptr_t)GCONTEXT(x)->gc)
Generic_Get_Display (Gc, GCONTEXT)