diff --git a/components/rtgui/common/rtgui_object.c b/components/rtgui/common/rtgui_object.c index a4248cfb294c79aae8f9b69b9d8e833cede5cb8b..1ee7c1cb10be79ad4918d9c886750fe8fd22977c 100644 --- a/components/rtgui/common/rtgui_object.c +++ b/components/rtgui/common/rtgui_object.c @@ -29,7 +29,7 @@ static void _rtgui_object_destructor(rtgui_object_t *object) /* nothing */ } -DEFINE_CLASS_TYPE(type, "object", +DEFINE_CLASS_TYPE(object, "object", RT_NULL, _rtgui_object_constructor, _rtgui_object_destructor, diff --git a/components/rtgui/include/rtgui/rtgui_object.h b/components/rtgui/include/rtgui/rtgui_object.h index f89bfbf1b224491198d2a0b8d6b43ba0a38a13e7..84d163192e9f92a8d32bd4166b3c2085a91990e4 100644 --- a/components/rtgui/include/rtgui/rtgui_object.h +++ b/components/rtgui/include/rtgui/rtgui_object.h @@ -82,9 +82,9 @@ const rtgui_type_t *rtgui_object_object_type_get(rtgui_object_t *object); #define RTGUI_OBJECT_CHECK_TYPE(_obj, _type) \ (rtgui_type_inherits_from(((rtgui_object_t *)(_obj))->type, (_type))) -DECLARE_CLASS_TYPE(type); +DECLARE_CLASS_TYPE(object); /** Gets the type of an object */ -#define RTGUI_OBJECT_TYPE RTGUI_TYPE(type) +#define RTGUI_OBJECT_TYPE RTGUI_TYPE(object) /** Casts the object to an rtgui_object_t */ #define RTGUI_OBJECT(obj) (RTGUI_OBJECT_CAST((obj), RTGUI_OBJECT_TYPE, struct rtgui_object)) /** Checks if the object is an rtgui_Object */