annotate nocompile/extern_06.d @ 201:96fb902700fe

casting function pointers Russ Lewis <spamhole-2001-07-16@deming-os.org> 2004-12-14 news:cpoao4$lqs$1@digitaldaemon.com nntp://news.digitalmars.com/digitalmars.D.bugs:2556
author thomask
date Wed, 15 Dec 2004 17:36:14 +0000
parents
children 52c9e86b6486
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
201
96fb902700fe casting function pointers
thomask
parents:
diff changeset
1 // $HeadURL$
96fb902700fe casting function pointers
thomask
parents:
diff changeset
2 // $Date$
96fb902700fe casting function pointers
thomask
parents:
diff changeset
3 // $Author$
96fb902700fe casting function pointers
thomask
parents:
diff changeset
4
96fb902700fe casting function pointers
thomask
parents:
diff changeset
5 // @author@ Russ Lewis <spamhole-2001-07-16@deming-os.org>
96fb902700fe casting function pointers
thomask
parents:
diff changeset
6 // @date@ 2004-12-14
96fb902700fe casting function pointers
thomask
parents:
diff changeset
7 // @uri@ news:cpoao4$lqs$1@digitaldaemon.com
96fb902700fe casting function pointers
thomask
parents:
diff changeset
8 // @url@ nntp://news.digitalmars.com/digitalmars.D.bugs:2556
96fb902700fe casting function pointers
thomask
parents:
diff changeset
9
96fb902700fe casting function pointers
thomask
parents:
diff changeset
10 module dstress.nocompile.extern_06;
96fb902700fe casting function pointers
thomask
parents:
diff changeset
11
96fb902700fe casting function pointers
thomask
parents:
diff changeset
12 // missing extern(C) modifier
96fb902700fe casting function pointers
thomask
parents:
diff changeset
13
96fb902700fe casting function pointers
thomask
parents:
diff changeset
14 extern(C) void *wglGetProcAddress(char*);
96fb902700fe casting function pointers
thomask
parents:
diff changeset
15 extern(C) int function() glFunctionFoo;
96fb902700fe casting function pointers
thomask
parents:
diff changeset
16
96fb902700fe casting function pointers
thomask
parents:
diff changeset
17 static this() {
96fb902700fe casting function pointers
thomask
parents:
diff changeset
18 glFunctionFoo = cast(int function()) wglGetProcAddress("glFunctionFoo");
96fb902700fe casting function pointers
thomask
parents:
diff changeset
19 }
96fb902700fe casting function pointers
thomask
parents:
diff changeset
20
96fb902700fe casting function pointers
thomask
parents:
diff changeset
21