Calling dynamically bound functions from weakly pure function

John Colvin via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jul 18 09:19:19 PDT 2014


On Friday, 18 July 2014 at 16:12:18 UTC, Rene Zwanenburg wrote:
> On Friday, 18 July 2014 at 15:57:40 UTC, John Colvin wrote:
>> On Friday, 18 July 2014 at 14:15:46 UTC, Rene Zwanenburg wrote:
>>> For all intents and purposes, the following code can be 
>>> weakly pure:
>>>
>>> struct VAO
>>> {
>>>
>>> }
>>
>> urrmm. Did you mean to post more than that?
>
> Haha yup. Not sure what happened there.
>
> I'm a bit short on time at the moment, but what it comes down 
> to is that Derelict loads functions from DLL's and assigns them 
> to global function pointers. Of course, these function pointers 
> have to be mutable.
>
> Is there a nice way to call such functions from a pure function?

I haven't tried it, but can you cast the function references to 
be pure?


More information about the Digitalmars-d-learn mailing list