Closed lmbarros closed 8 years ago
Sure, that's fine. All of the bindings in Derelict should have @nogc, I just haven't been actively maintaining this one. However, in order to compile with pre-2.066 versions of the D front end, the module should import derelict.util.system and @nogc needs to come before nothrow. @nogc was not part of the language before 2.066, so to maintain backward compatibility, it's implemented as a UDA in derelict.util.system. That, of course, does nothing, but it allows the code to compile. Unfortunately, UDAs can't (or couldn't -- not sure if it's been fixed, but definitely an issue pre-2.066) follow built-in attributes in declarations. So @nogc has to precede nothrow for backward compatibility.
It should also be applied to the other modules (color, dialog, font, etc...). Rather than merging the PR, I'll go ahead and get it done.
Implemented and tagged as 0.0.3. I think I should give some more attention to this and get ready for a 1.0 release before Allegro 5.2 becomes official.
I didn't test this too much, but so far so good. Anyway, I think this simple change makes sense (and this is what the SDL2 bindings already do).