no more GTK_CHECK_CAST in newly written code?



I've found gtktypeutils.h define GTK_CHECK_CAST with comment of
	/* glib macro wrappers (compatibility) */.
is that meaning I'd better not to use SOME_CHECK_CAST, but to use directly G_TYPE_CHECK_INSTANCE_CAST?

for example, GStreamer do not use GST_CHECK_CAST, refer directly to G_TYPE_...
"""
#define GST_OBJECT_CAST(obj)            ((GstObject*)(obj))
#define GST_OBJECT_CLASS_CAST(klass)    ((GstObjectClass*)(klass))

#ifdef GST_TYPE_PARANOID
# define GST_OBJECT(obj)                (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_OBJECT, GstObject))
# define GST_OBJECT_CLASS(klass)        (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_OBJECT, GstObjectClass))
#else
# define GST_OBJECT                     GST_OBJECT_CAST
# define GST_OBJECT_CLASS               GST_OBJECT_CLASS_CAST
#endif
"""

that form of definition is new GTK+-2.x stlye?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]