How can a function pointer required to be extern(C)?

John Chapman johnch_atms at hotmail.com
Wed Apr 12 21:00:04 UTC 2023


On Wednesday, 12 April 2023 at 20:36:59 UTC, H. S. Teoh wrote:
> -------snip-------
> extern(C) void* abc(void*) {return null;}
>
> alias FuncPtr = typeof(&abc);

You can also express it like this:

```d
extern(C) alias FuncPtr = void* function(void*);
```


More information about the Digitalmars-d-learn mailing list