From 250d82cd3fdf4cfa2b8cc5ad93cc4577a1daa2e3 Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Tue, 1 Jun 2010 11:50:02 +0100 Subject: [PATCH] =?utf8?q?cogl:=20avoid=20=E2=80=98=5Fcogl=5Fxyz=5Fhandle?= =?utf8?q?=5Fnew=E2=80=99=20defined=20but=20not=20used=20warnings?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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. --- clutter/cogl/cogl/cogl-object.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/clutter/cogl/cogl/cogl-object.h b/clutter/cogl/cogl/cogl-object.h index bfa660b..2ef1553 100644 --- a/clutter/cogl/cogl/cogl-object.h +++ b/clutter/cogl/cogl/cogl-object.h @@ -123,13 +123,7 @@ _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##TypeName * \ _cogl_##type_name##_pointer_from_handle (CoglHandle handle) \ { \ return 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 */ -- 2.7.4