Complex C typedef decl replacement

Andrey andr-sar at yandex.ru
Fri Nov 23 05:26:47 PST 2012


Hello everyone!

What a proper replacement is for C declarations like this?

typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum 
target, GLint level, GLvoid *img);

typedef GLvoid (APIENTRY * PFNGLMULTIDRAWARRAYSPROC) (GLenum 
mode, const GLint *first, const GLsizei *count, GLsizei 
primcount);

And this:

void glAlphaFunc( GLenum func, GLclampf ref ); //ref is not 
acceptable as var name in D

alias void (* _GLUfuncptr)(); //how to make a proper aliasing of 
a function pointer?


More information about the Digitalmars-d-learn mailing list