May 13, 2004 D equiv - typedef of a function pointer | ||||
---|---|---|---|---|
| ||||
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 Re: D equiv - typedef of a function pointer | ||||
---|---|---|---|---|
| ||||
Posted in reply to nic at nicshouse dot co dot uk | 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/ |
Copyright © 1999-2021 by the D Language Foundation