cdecl: C gibberish ↔ English
Posted by jpluimers on 2019/02/20
Cool site if I ever need to decipher C declarations again: [WayBack] cdecl: C gibberish ↔ English.
You can even store the C code as a URL.
via:
- [WayBack] can someone explain me the C syntax below (from sqlite)SQLITE_PRIVATE void (*sqlite3OsDlSym(sqlite3_vfs *, void *, const char *))(void)… – Paul TOTH – Google+
- [WayBack] c – How do I interpret this declaration that appears to be a function declaration, but doesn’t fit the usual mould? – Stack Overflow
–jeroen
Clinton Johnson said
The english feels a bit like gibberish as well..
Type
sqlite3OsDlSym = Procedure(P1,P2 : Pointer; Const P3: PChar);
Is about the closest I can make out of the english and C….
Jürgen Krämer said
Actually it’s
type Psqlite3_vfs = ^sqlite3_vfs;
function sqlite3OsDlSym(p1: Psqlite3_vfs; p2: Pointer; P3: PChar): TProc;
(A function accepting three parameters which returns a pointer to a function without parameters and without a return type (a.k.a. a procedure).)
The “const char *” cannot be expressed exactly in Delphi. In C it’s a pointer to one or more constant chars, not a constant pointer.