glapi: use an assertion in SET_by_offset instead of doing nothing
Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
This commit is contained in:
@@ -108,14 +108,8 @@ class PrintRemapTable(gl_XML.gl_print_base):
|
||||
print(' (offset >= 0) ? (((_glapi_proc *)(disp))[offset]) : NULL')
|
||||
print('#define SET_by_offset(disp, offset, fn) \\')
|
||||
print(' do { \\')
|
||||
print(' if ( (offset) < 0 ) { \\')
|
||||
print(' /* fprintf( stderr, "[%s:%u] SET_by_offset(%p, %d, %s)!\\n", */ \\')
|
||||
print(' /* __func__, __LINE__, disp, offset, # fn); */ \\')
|
||||
print(' /* abort(); */ \\')
|
||||
print(' } \\')
|
||||
print(' else { \\')
|
||||
print(' ( (_glapi_proc *) (disp) )[offset] = (_glapi_proc) fn; \\')
|
||||
print(' } \\')
|
||||
print(' assert(offset >= 0 && offset < _gloffset_COUNT); \\')
|
||||
print(' ( (_glapi_proc *) (disp) )[offset] = (_glapi_proc) fn; \\')
|
||||
print(' } while(0)')
|
||||
print('')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user