[Cogl] [PATCH] object: Move cogl_object_{ref, unref}() to cogl-object.h

Robert Bragg robert at sixbynine.org
Mon Oct 1 05:39:57 PDT 2012


This looks good to land to me:

Reviewed-by: Robert Bragg <robert at linux.intel.com>

thanks,
- Robert

On Sun, Sep 30, 2012 at 12:27 AM, Damien Lespiau
<damien.lespiau at gmail.com> wrote:
> From: Damien Lespiau <damien.lespiau at intel.com>
>
> ---
>  cogl/cogl-object.h |   21 +++++++++++++++++++++
>  cogl/cogl-types.h  |   21 ---------------------
>  2 files changed, 21 insertions(+), 21 deletions(-)
>
> diff --git a/cogl/cogl-object.h b/cogl/cogl-object.h
> index 633c6af..a65bd9c 100644
> --- a/cogl/cogl-object.h
> +++ b/cogl/cogl-object.h
> @@ -30,6 +30,27 @@ typedef struct _CoglObject      CoglObject;
>  #define COGL_OBJECT(X)          ((CoglObject *)X)
>
>  /**
> + * cogl_object_ref: (skip)
> + * @object: a #CoglObject
> + *
> + * Increases the reference count of @object by 1
> + *
> + * Returns: the @object, with its reference count increased
> + */
> +void *
> +cogl_object_ref (void *object);
> +
> +/**
> + * cogl_object_unref: (skip)
> + * @object: a #CoglObject
> + *
> + * Drecreases the reference count of @object by 1; if the reference
> + * count reaches 0, the resources allocated by @object will be freed
> + */
> +void
> +cogl_object_unref (void *object);
> +
> +/**
>   * CoglUserDataKey:
>   * @unused: ignored.
>   *
> diff --git a/cogl/cogl-types.h b/cogl/cogl-types.h
> index cec8a1a..3d096cd 100644
> --- a/cogl/cogl-types.h
> +++ b/cogl/cogl-types.h
> @@ -94,27 +94,6 @@ typedef struct { \
>          } _ ## TYPE ## SizeCheck
>
>  /**
> - * cogl_object_ref: (skip)
> - * @object: a #CoglObject
> - *
> - * Increases the reference count of @object by 1
> - *
> - * Returns: the @object, with its reference count increased
> - */
> -void *
> -cogl_object_ref (void *object);
> -
> -/**
> - * cogl_object_unref: (skip)
> - * @object: a #CoglObject
> - *
> - * Drecreases the reference count of @object by 1; if the reference
> - * count reaches 0, the resources allocated by @object will be freed
> - */
> -void
> -cogl_object_unref (void *object);
> -
> -/**
>   * CoglFuncPtr:
>   *
>   * The type used by cogl for function pointers, note that this type
> --
> 1.7.7.5
>
> _______________________________________________
> Cogl mailing list
> Cogl at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/cogl


More information about the Cogl mailing list