Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Unified Diff: ui/gl/generate_bindings.py

Issue 2588263005: Change GLGetProcAddress typedef to function returning function pointer (Closed)
Patch Set: fix cast Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/gl/generate_bindings.py
diff --git a/ui/gl/generate_bindings.py b/ui/gl/generate_bindings.py
index 3640aac5475b995c92395bbe334f168e3bb196f8..d06481ab5a733f916caf027e6efd9d24d1436bec 100755
--- a/ui/gl/generate_bindings.py
+++ b/ui/gl/generate_bindings.py
@@ -2976,14 +2976,17 @@ void MakeFunctionUnique(const char *func_name) {
# Write a function to lookup a mock GL function based on its name.
file.write('\n')
- file.write('void* GL_BINDING_CALL ' +
+ file.write('GLFunctionPointerType GL_BINDING_CALL ' +
'MockGLInterface::GetGLProcAddress(const char* name) {\n')
for key in sorted_function_names:
name = uniquely_named_functions[key]['name']
file.write(' if (strcmp(name, "%s") == 0)\n' % name)
- file.write(' return reinterpret_cast<void*>(Mock_%s);\n' % name)
+ file.write(
+ ' return reinterpret_cast<GLFunctionPointerType>(Mock_%s);\n' %
+ name)
# Always return a non-NULL pointer like some EGL implementations do.
- file.write(' return reinterpret_cast<void*>(&MockInvalidFunction);\n')
+ file.write(' return reinterpret_cast<GLFunctionPointerType>('
+ '&MockInvalidFunction);\n')
file.write('}\n')
file.write('\n')

Powered by Google App Engine
This is Rietveld 408576698