mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 10:00:45 -05:00
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:
parent
db7cc5b1b4
commit
5f8fadeb1c
@ -123,12 +123,6 @@ _cogl_##type_name##_object_new (Cogl##TypeName *new_obj) \
|
|||||||
return 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##TypeName * \
|
||||||
_cogl_##type_name##_pointer_from_handle (CoglHandle handle) \
|
_cogl_##type_name##_pointer_from_handle (CoglHandle handle) \
|
||||||
{ \
|
{ \
|
||||||
@ -177,7 +171,15 @@ cogl_##type_name##_unref (void *object) \
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* For temporary compatability */
|
/* 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 */
|
#endif /* __COGL_OBJECT_H */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user