From ff9409b1737627857eb47f64f536a3f66b6a09a4 Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Mon, 11 Apr 2016 13:01:07 +0200 Subject: Imported Upstream version 2.0.0 --- Object.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Object.c') diff --git a/Object.c b/Object.c index 2399e50..120d28c 100644 --- a/Object.c +++ b/Object.c @@ -9,11 +9,12 @@ in the source distribution for its full text. /*{ #include "RichString.h" +#include "XAlloc.h" 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 @@ -26,7 +27,7 @@ typedef void(*Object_Delete)(Object*); #define Class(class_) ((ObjectClass*)(&(class_ ## _class))) -#define AllocThis(class_) (class_*) malloc(sizeof(class_)); Object_setClass(this, Class(class_)); +#define AllocThis(class_) (class_*) xMalloc(sizeof(class_)); Object_setClass(this, Class(class_)); typedef struct ObjectClass_ { const void* extends; -- cgit v1.2.3