Cryptic C function pointer for conversion

data pulverizer via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Dec 17 05:39:27 PST 2016


I have come across a function pointer in C that I am attempting 
to convert, and am not sure what the current interpretation is:

```
\\ The C Code:
void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void);
```

The best I can tell is that this is a function pointer that 
returns a function that returns void and the correct translation 
to D is:

```
alias void function(sqlite3_vfs*,void*, const char *zSymbol) ptr;
ptr* function() xDlSym;
```

I've never seen a construction like this before so my 
interpretation might be wrong!


More information about the Digitalmars-d-learn mailing list