summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2014-04-25 19:41:23 -0300
committerHisham Muhammad <hisham@gobolinux.org>2014-04-25 19:41:23 -0300
commit78d09f955a0462d3cf328e7f753031cea2ba21c7 (patch)
tree8cb441bfe9228c474164880955a6bc06b4558ce4
parentd7e5020169d79cad593af93780063f7cc4d880d3 (diff)
Compare with long, for 64-bit systems
-rw-r--r--ListItem.c2
-rw-r--r--ListItem.h2
-rw-r--r--Object.c2
-rw-r--r--Object.h2
-rw-r--r--Process.c4
-rw-r--r--Process.h4
6 files changed, 8 insertions, 8 deletions
diff --git a/ListItem.c b/ListItem.c
index 140ebdc5..05f5e960 100644
--- a/ListItem.c
+++ b/ListItem.c
@@ -69,7 +69,7 @@ const char* ListItem_getRef(ListItem* this) {
return this->value;
}
-int ListItem_compare(const void* cast1, const void* cast2) {
+long ListItem_compare(const void* cast1, const void* cast2) {
ListItem* obj1 = (ListItem*) cast1;
ListItem* obj2 = (ListItem*) cast2;
return strcmp(obj1->value, obj2->value);
diff --git a/ListItem.h b/ListItem.h
index a3ca0759..46d2d653 100644
--- a/ListItem.h
+++ b/ListItem.h
@@ -26,7 +26,7 @@ void ListItem_append(ListItem* this, const char* text);
const char* ListItem_getRef(ListItem* this);
-int ListItem_compare(const void* cast1, const void* cast2);
+long ListItem_compare(const void* cast1, const void* cast2);
#endif
diff --git a/Object.c b/Object.c
index 2399e50c..53b9976b 100644
--- a/Object.c
+++ b/Object.c
@@ -13,7 +13,7 @@ in the source distribution for its full text.
typedef struct Object_ Object;
typedef void(*Object_Display)(Object*, RichString*);
-typedef int(*Object_Compare)(const void*, const void*);
+typedef long(*Object_Compare)(const void*, const void*);
typedef void(*Object_Delete)(Object*);
#define Object_getClass(obj_) ((Object*)(obj_))->klass
diff --git a/Object.h b/Object.h
index bfabe6f8..2186ee52 100644
--- a/Object.h
+++ b/Object.h
@@ -14,7 +14,7 @@ in the source distribution for its full text.
typedef struct Object_ Object;
typedef void(*Object_Display)(Object*, RichString*);
-typedef int(*Object_Compare)(const void*, const void*);
+typedef long(*Object_Compare)(const void*, const void*);
typedef void(*Object_Delete)(Object*);
#define Object_getClass(obj_) ((Object*)(obj_))->klass
diff --git a/Process.c b/Process.c
index 31ceed72..708067aa 100644
--- a/Process.c
+++ b/Process.c
@@ -793,13 +793,13 @@ void Process_sendSignal(Process* this, size_t sgn) {
kill(this->pid, (int) sgn);
}
-int Process_pidCompare(const void* v1, const void* v2) {
+long Process_pidCompare(const void* v1, const void* v2) {
Process* p1 = (Process*)v1;
Process* p2 = (Process*)v2;
return (p1->pid - p2->pid);
}
-int Process_compare(const void* v1, const void* v2) {
+long Process_compare(const void* v1, const void* v2) {
Process *p1, *p2;
ProcessList *pl = ((Process*)v1)->pl;
if (pl->direction == 1) {
diff --git a/Process.h b/Process.h
index 19083fde..87196eee 100644
--- a/Process.h
+++ b/Process.h
@@ -232,8 +232,8 @@ bool Process_setAffinity(Process* this, Affinity* affinity);
void Process_sendSignal(Process* this, size_t sgn);
-int Process_pidCompare(const void* v1, const void* v2);
+long Process_pidCompare(const void* v1, const void* v2);
-int Process_compare(const void* v1, const void* v2);
+long Process_compare(const void* v1, const void* v2);
#endif

© 2014-2024 Faster IT GmbH | imprint | privacy policy