summaryrefslogtreecommitdiffstats
path: root/Object.h
diff options
context:
space:
mode:
authorHisham <hisham@gobolinux.org>2016-02-02 15:53:02 +0100
committerHisham <hisham@gobolinux.org>2016-02-02 15:53:02 +0100
commitb54d2dde407921caa7561dde6b45831ba93d0840 (patch)
treecd81eea35dd65e46d22f2801ea403e1efc06eb59 /Object.h
parenta1f7f2869ec2bd860d5b4e4b39736ca877afdf6f (diff)
Check for failure in allocations.
Diffstat (limited to 'Object.h')
-rw-r--r--Object.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Object.h b/Object.h
index 2186ee52..19a667c8 100644
--- a/Object.h
+++ b/Object.h
@@ -10,6 +10,7 @@ in the source distribution for its full text.
*/
#include "RichString.h"
+#include "XAlloc.h"
typedef struct Object_ Object;
@@ -27,7 +28,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;

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