From 8459f4a63aec97847b0e3957ffb82beff94035fa Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 26 Jun 2012 14:47:19 -0600 Subject: mesa: make _mesa_reference_array_object() an inline function As we do for texture objects, buffer objects, etc. --- src/mesa/main/arrayobj.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/mesa/main/arrayobj.c') diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c index 4c50066de0b..3439ab6b5c1 100644 --- a/src/mesa/main/arrayobj.c +++ b/src/mesa/main/arrayobj.c @@ -123,14 +123,15 @@ _mesa_delete_array_object( struct gl_context *ctx, struct gl_array_object *obj ) /** * Set ptr to arrayObj w/ reference counting. + * Note: this should only be called from the _mesa_reference_array_object() + * inline function. */ void -_mesa_reference_array_object(struct gl_context *ctx, - struct gl_array_object **ptr, - struct gl_array_object *arrayObj) +_mesa_reference_array_object_(struct gl_context *ctx, + struct gl_array_object **ptr, + struct gl_array_object *arrayObj) { - if (*ptr == arrayObj) - return; + assert(*ptr != arrayObj); if (*ptr) { /* Unreference the old array object */ -- cgit v1.2.3