* the __stdcall convention which requires the callee to clean up the
* call stack. That's impossible with one generic no-op function.
*/
-#if !USE_GLAPI_NOP_FEATURES
-static struct _glapi_table *
-new_nop_table(unsigned numEntries)
+struct _glapi_table *
+_mesa_new_nop_table(unsigned numEntries)
{
struct _glapi_table *table;
+#if !USE_GLAPI_NOP_FEATURES
table = malloc(numEntries * sizeof(_glapi_proc));
if (table) {
_glapi_proc *entry = (_glapi_proc *) table;
entry[i] = (_glapi_proc) generic_nop;
}
}
+#else
+ table = _glapi_new_nop_table(numEntries);
+#endif
return table;
}
-#endif
/**
*/
int numEntries = MAX2(_glapi_get_dispatch_table_size(), _gloffset_COUNT);
-#if !USE_GLAPI_NOP_FEATURES
- struct _glapi_table *table = new_nop_table(numEntries);
-#else
- struct _glapi_table *table = _glapi_new_nop_table(numEntries);
+ struct _glapi_table *table = _mesa_new_nop_table(numEntries);
#if defined(_WIN32)
if (table) {
}
#endif
+#if USE_GLAPI_NOP_FEATURES
_glapi_set_nop_handler(nop_handler);
#endif
_mesa_init_driver_functions(&driver_functions);
const unsigned size = _glapi_get_dispatch_table_size();
- nop_table = (_glapi_proc *) _glapi_new_nop_table(size);
+ nop_table = (_glapi_proc *) _mesa_new_nop_table(size);
}
void