May 13, 2004
Hi

I am trying to convert a C .h to a D module and have come up against a typedef to a function pointer, like this:

typedef int (*func_name)(struct a_type *arg1, struct a_type *arg2);

Can anyone tell me how I would format this in a D module wihh C linkage?

Cheers
Nic


May 13, 2004
nic at nicshouse dot co dot uk wrote:
> 
> typedef int (*func_name)(struct a_type *arg1, struct a_type *arg2);
> 

Try this:

alias int function (a_type* arg1, a_type* arg2) func_name;


-- 
Julio César Carrascal Urquijo
http://jcesar.f2o.org/