cogl: avoid ‘_cogl_xyz_handle_new’ defined but not used warnings

This patch makes it so that only the backwards compatibility
COGL_HANDLE_DEFINE macro defines a _cogl_xyz_handle_new function. The
new COGL_OBJECT_DEFINE macro only defines a _cogl_xyz_object_new
function.
This commit is contained in:
Robert Bragg 2010-06-01 11:50:02 +01:00
parent db7cc5b1b4
commit 5f8fadeb1c

View File

@ -123,12 +123,6 @@ _cogl_##type_name##_object_new (Cogl##TypeName *new_obj) \
return new_obj; \
} \
\
static Cogl##TypeName * \
_cogl_##type_name##_handle_new (CoglHandle handle) \
{ \
return _cogl_##type_name##_object_new (handle); \
} \
\
Cogl##TypeName * \
_cogl_##type_name##_pointer_from_handle (CoglHandle handle) \
{ \
@ -177,7 +171,15 @@ cogl_##type_name##_unref (void *object) \
}
/* For temporary compatability */
#define COGL_HANDLE_DEFINE COGL_OBJECT_DEFINE
#define COGL_HANDLE_DEFINE(TypeName, type_name) \
\
COGL_OBJECT_DEFINE (TypeName, type_name) \
\
static Cogl##TypeName * \
_cogl_##type_name##_handle_new (CoglHandle handle) \
{ \
return _cogl_##type_name##_object_new (handle); \
}
#endif /* __COGL_OBJECT_H */