November 09, 2010 Pure and C functions | ||||
---|---|---|---|---|
| ||||
Is there any way to make a function which calls C functions pure? - Jonathan M Davis |
November 09, 2010 Re: Pure and C functions | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | Jonathan M Davis wrote:
> Is there any way to make a function which calls C functions pure?
>
> - Jonathan M Davis
Just mark the C function as pure, if it's truly pure. If it isn't really pure, you'll have to use a cast (eg, by taking its address and then casting the function pointer).
|
Copyright © 1999-2021 by the D Language Foundation