Wrapping C code?

anonymous anonymous at example.com
Sat Mar 29 12:49:35 PDT 2014


On Saturday, 29 March 2014 at 19:25:37 UTC, CJS wrote:
> When you say define them in bulk at compile time, is there some 
> convenient way to just give an array of actions and iterate 
> over them to generate such statements? So that the only work 
> that needs to be updated to add/remove actions is updating that 
> list?

Well, you can write one. You can also let D generate that list:
__traits(allMembers, some_c_module) gives you all symbols in
some_c_module.

Iterate over them, generate alias declarations, mix those
declarations in.


More information about the Digitalmars-d-learn mailing list