http://d.puremagic.com/issues/show_bug.cgi?id=5570



--- Comment #40 from Andrej Mitrovic <andrej.mitrov...@gmail.com> 2013-09-22 
02:47:30 PDT ---
(In reply to comment #39)
> This leads to a lot of duplication, for example the authors had to duplicate c
> bindings just to address this:
> https://github.com/Jebbs/DSFML-C where they point to this bug.

I wonder if as a workaround you could type the prototypes in D as:

// note the .tupleof
sfWindow* sfWindow_create(VideoMode.tupleof mode, const(char)* title, uint
style, const(ContextSettings)* settings);

And then call it via:

VideoMode vm;
sfWindow_create(vm.tupleof, ...);

I'd assume this would then properly use the stack? It's worth trying out to
avoid any new code duplication, and then when 5570 is finally fixed all you
have to do in user code is to remove ".tupleof" in the calls.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to