diff options
author | George Sapountzis <[email protected]> | 2010-03-08 01:55:10 +0200 |
---|---|---|
committer | George Sapountzis <[email protected]> | 2010-03-10 18:44:46 +0200 |
commit | 3833a76eef6b45b82c102a49055602632f960a99 (patch) | |
tree | 013357df325e0fa5eb0258a9d7afb3c6c84d0c1f /src | |
parent | cae4fdda8d27cac21714571adb0bfada6d96152a (diff) |
glapi: add function set_entry_info
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/glapi/glapi_getproc.c | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/src/mesa/glapi/glapi_getproc.c b/src/mesa/glapi/glapi_getproc.c index ea905bb2cb4..95974fe3a0f 100644 --- a/src/mesa/glapi/glapi_getproc.c +++ b/src/mesa/glapi/glapi_getproc.c @@ -325,6 +325,27 @@ add_function_name( const char * funcName ) } +static struct _glapi_function * +set_entry_info( struct _glapi_function * entry, const char * signature, unsigned offset ) +{ + char * sig_dup = NULL; + + if (signature == NULL) + return NULL; + + sig_dup = str_dup(signature); + if (sig_dup == NULL) + return NULL; + + fill_in_entrypoint_offset(entry->dispatch_stub, offset); + + entry->parameter_signature = sig_dup; + entry->dispatch_offset = offset; + + return entry; +} + + /** * Fill-in the dispatch stub for the named function. * @@ -461,9 +482,7 @@ _glapi_add_dispatch( const char * const * function_names, } } - entry[i]->parameter_signature = str_dup(real_sig); - fill_in_entrypoint_offset(entry[i]->dispatch_stub, offset); - entry[i]->dispatch_offset = offset; + set_entry_info( entry[i], real_sig, offset ); } } |