summaryrefslogtreecommitdiff
path: root/src/Object.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Object.c')
-rw-r--r--src/Object.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/Object.c b/src/Object.c
index 29d9066..fc12be5 100644
--- a/src/Object.c
+++ b/src/Object.c
@@ -58,6 +58,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/Xt/Object.c,v 1.6 2001/12/14 19:56:26 dawes Exp $ */
#define OBJECT
#include "IntrinsicI.h"
@@ -143,7 +144,7 @@ static void ConstructCallbackOffsets(widgetClass)
superTable = (CallbackTable)
((ObjectClass) objectClass->object_class.superclass)->
object_class.callback_private;
- tableSize = (int) superTable[0];
+ tableSize = (int)(long) superTable[0];
} else {
superTable = (CallbackTable) NULL;
tableSize = 0;
@@ -163,10 +164,10 @@ static void ConstructCallbackOffsets(widgetClass)
newTable = (CallbackTable)
__XtMalloc(sizeof(XrmResource *) * (tableSize + 1));
- newTable[0] = (XrmResource *) tableSize;
+ newTable[0] = (XrmResource *)(long) tableSize;
if (superTable)
- tableSize -= (int) superTable[0];
+ tableSize -= (int)(long) superTable[0];
resourceList = (XrmResourceList) objectClass->object_class.resources;
for (i=1; tableSize > 0; resourceList++)
if (resourceList->xrm_type == QCallback) {
@@ -175,7 +176,8 @@ static void ConstructCallbackOffsets(widgetClass)
}
if (superTable)
- for (tableSize = (int) *superTable++; --tableSize >= 0; superTable++)
+ for (tableSize = (int)(long) *superTable++;
+ --tableSize >= 0; superTable++)
newTable[i++] = *superTable;
objectClass->object_class.callback_private = (XtPointer) newTable;
@@ -252,7 +254,7 @@ static Boolean ObjectSetValues(old, request, widget, args, num_args)
/* Compile any callback lists into internal form */
offsets = (CallbackTable) XtClass(widget)->core_class.callback_private;
- for (i= (int) *(offsets++); --i >= 0; offsets++) {
+ for (i= (int)(long) *(offsets++); --i >= 0; offsets++) {
ol = (InternalCallbackList *)
((char *) old - (*offsets)->xrm_offset - 1);
nl = (InternalCallbackList *)
@@ -281,7 +283,7 @@ static void ObjectDestroy (widget)
offsets = (CallbackTable)
widget->core.widget_class->core_class.callback_private;
- for (i = (int) *(offsets++); --i >= 0; offsets++) {
+ for (i = (int)(long) *(offsets++); --i >= 0; offsets++) {
cl = *(InternalCallbackList *)
((char *) widget - (*offsets)->xrm_offset - 1);
if (cl) XtFree((char *) cl);