glapi: these two should be ok for add_dispatch ...
authorGeorge Sapountzis <gsapountzis@gmail.com>
Mon, 8 Mar 2010 01:10:30 +0000 (03:10 +0200)
committerGeorge Sapountzis <gsapountzis@gmail.com>
Wed, 10 Mar 2010 16:44:47 +0000 (18:44 +0200)
- a function cannot be both static and extension, right ?

- we should be setting the offset only if not already set, right ?

src/mesa/glapi/glapi_getproc.c

index 921df262af88d3a1d50443ab898e97f46cd11d7f..5a8c6953ac212147d0e613c1e6229b69d4b02e0c 100644 (file)
@@ -437,6 +437,8 @@ _glapi_add_dispatch( const char * const * function_names,
         }
 
         offset = static_offset;
+
+        continue;
       }
 
       /* search added extension functions */
@@ -492,7 +494,9 @@ _glapi_add_dispatch( const char * const * function_names,
         }
       }
 
-      set_entry_info( entry[i], real_sig, offset );
+      if (entry[i]->dispatch_offset == ~0) {
+        set_entry_info( entry[i], real_sig, offset );
+      }
    }
 
    return offset;