www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - D equiv - typedef of a function pointer

reply nic at nicshouse dot co dot uk <nic_member pathlink.com> writes:
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
parent =?ISO-8859-1?Q?Julio_C=E9sar_Carrascal_Urquijo?= writes:
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/
May 13 2004