Passing Structs to function like in C

Cauterite via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Aug 12 08:23:17 PDT 2016


On Friday, 12 August 2016 at 15:21:22 UTC, D.Rex wrote:
> extern unsigned long free_page_tables(struct task_struct * tsk);

extern(C) ulong free_page_tables(task_struct* tsk);

void main() {
     task_struct tsk =  …… ;
     free_page_tables(&tsk);
};

That should be what you're after?


More information about the Digitalmars-d-learn mailing list