mesa: Silence GCC warning 'comparison between signed and unsigned integer expressions'
[mesa.git] / src / mesa / main / arrayobj.c
index ac3e7e666c2b01b2e1013a4923ed0459dbb3c462..5d50d29f8f6ca64420ed35ed8cc87ece44835595 100644 (file)
@@ -1,6 +1,5 @@
 /*
  * Mesa 3-D graphics library
- * Version:  7.6
  *
  * Copyright (C) 1999-2008  Brian Paul   All Rights Reserved.
  * (C) Copyright IBM Corporation 2006
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * BRIAN PAUL OR IBM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
  */
 
 
@@ -44,7 +43,6 @@
 #include "image.h"
 #include "imports.h"
 #include "context.h"
-#include "mfeatures.h"
 #include "bufferobj.h"
 #include "arrayobj.h"
 #include "macros.h"
@@ -62,8 +60,8 @@
  * non-existent.
  */
 
-static inline struct gl_array_object *
-lookup_arrayobj(struct gl_context *ctx, GLuint id)
+struct gl_array_object *
+_mesa_lookup_arrayobj(struct gl_context *ctx, GLuint id)
 {
    if (id == 0)
       return NULL;
@@ -117,6 +115,7 @@ _mesa_delete_array_object( struct gl_context *ctx, struct gl_array_object *obj )
    unbind_array_object_vbos(ctx, obj);
    _mesa_reference_buffer_object(ctx, &obj->ElementArrayBufferObj, NULL);
    _glthread_DESTROY_MUTEX(obj->Mutex);
+   free(obj->Label);
    free(obj);
 }
 
@@ -355,7 +354,7 @@ bind_vertex_array(struct gl_context *ctx, GLuint id, GLboolean genRequired)
    }
    else {
       /* non-default array object */
-      newObj = lookup_arrayobj(ctx, id);
+      newObj = _mesa_lookup_arrayobj(ctx, id);
       if (!newObj) {
          if (genRequired) {
             _mesa_error(ctx, GL_INVALID_OPERATION, "glBindVertexArray(non-gen name)");
@@ -441,7 +440,7 @@ _mesa_DeleteVertexArrays(GLsizei n, const GLuint *ids)
    }
 
    for (i = 0; i < n; i++) {
-      struct gl_array_object *obj = lookup_arrayobj(ctx, ids[i]);
+      struct gl_array_object *obj = _mesa_lookup_arrayobj(ctx, ids[i]);
 
       if ( obj != NULL ) {
         ASSERT( obj->Name == ids[i] );
@@ -547,7 +546,7 @@ _mesa_IsVertexArray( GLuint id )
    if (id == 0)
       return GL_FALSE;
 
-   obj = lookup_arrayobj(ctx, id);
+   obj = _mesa_lookup_arrayobj(ctx, id);
    if (obj == NULL)
       return GL_FALSE;