Dynamic bindings to global variables
remi thebault via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Aug 2 08:31:47 PDT 2015
Hello
I wrote static bindings to a C library. I want to also offer a
version(Dynamic) of the bindings.
I follow and use derelict-util to get the address of function
pointers.
In the library I bind, there is also global variables. here's one
example in the static bindings:
extern __gshared wl_interface wl_display_interface;
(wl_interface is a struct, not a pointer alias)
How would one make dynamic binding of this?
Is it possible to retrieve the address of the symbol and use
std.conv.emplace?
thank you
More information about the Digitalmars-d-learn
mailing list