Commit cac33018 authored by Alexandre Julliard's avatar Alexandre Julliard

opengl32: Make all the function pointers and thunks static.

parent 7500e0fe
......@@ -683,7 +683,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(opengl);
# First, generate the function pointers
foreach (sort keys %ext_functions) {
my $func_ref = $ext_functions{$_};
print EXT ConvertType($func_ref->[1]), " (*$ext_prefix$func_ref->[0])( ";
print EXT "static ", ConvertType($func_ref->[1]), " (*$ext_prefix$func_ref->[0])( ";
for (my $i = 0; $i <= $#{@{$func_ref->[2]}}; $i++) {
my $type = ConvertType($func_ref->[2]->[$i]->[0]);
print EXT "$type";
......@@ -694,32 +694,22 @@ foreach (sort keys %ext_functions) {
}
}
print EXT 'void ' if ($#{@{$func_ref->[2]}} < 0);
print EXT ") = (void *) 0xdeadbeef;\n";
print EXT ");\n";
}
# Then, the function prototypes
print EXT "\n\n/* The function prototypes */\n";
# The thunks themselves....
print EXT "\n/* The thunks themselves....*/";
foreach (sort keys %ext_functions) {
my $func_ref = $ext_functions{$_};
print EXT ConvertType($func_ref->[1]), " WINAPI wine_$func_ref->[0]( ";
for (my $i = 0; $i <= $#{@{$func_ref->[2]}}; $i++) {
my $type = ConvertType($func_ref->[2]->[$i]->[0]);
print EXT "$type";
if ($i != $#{@{$func_ref->[2]}}) {
print EXT ", ";
} else {
print EXT " ";
}
}
print EXT 'void ' if ($#{@{$func_ref->[2]}} < 0);
print EXT ");\n";
my $string = GenerateThunk($ext_functions{$_}, 0, $ext_prefix, $gen_thread_safe);
print EXT "\nstatic $string";
}
# Then the table giving the string <-> function correspondance */
print EXT "\n\n/* The table giving the correspondance between names and functions */\n";
my @tmp = keys %ext_functions;
print EXT "int extension_registry_size = ", ($#tmp + 1), ";\n";
print EXT "OpenGL_extension extension_registry[", ($#tmp + 1), "] = {\n";
print EXT "const int extension_registry_size = ", ($#tmp + 1), ";\n";
print EXT "const OpenGL_extension extension_registry[", ($#tmp + 1), "] = {\n";
my $i = 0;
foreach (sort keys %ext_functions) {
my $func_ref = $ext_functions{$_};
......@@ -732,11 +722,4 @@ foreach (sort keys %ext_functions) {
}
print EXT "};\n";
# And, finally, the thunks themselves....
print EXT "\n/* The thunks themselves....*/";
foreach (sort keys %ext_functions) {
my $string = GenerateThunk($ext_functions{$_}, 0, $ext_prefix, $gen_thread_safe);
print EXT "\n$string";
}
close(EXT);
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -70,8 +70,8 @@ typedef struct {
void **func_ptr; /* where to store the value of glXGetProcAddressARB */
} OpenGL_extension;
extern OpenGL_extension extension_registry[];
extern int extension_registry_size;
extern const OpenGL_extension extension_registry[];
extern const int extension_registry_size;
const GLubyte* internal_glGetString(GLenum name);
void internal_glGetIntegerv(GLenum pname, GLint* params);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment