JarrettBillingsley
Joined: 20 Jun 2006 Posts: 457 Location: Pennsylvania!
|
Posted: Sun Nov 18, 2007 10:16 am Post subject: November 18 -- Revamped minid.bind, better docs for it |
|
|
This is revision 244 in the repo.
I've completely revamped minid.bind. It no longer uses templates with tuples to wrap things; the symbol length issues with DMDWin are just too restrictive to allow it. Now it uses a chained-method style for wrapping. For an example, look in test.d, in the commented part, for an example of wrapping a bit of arclib. You can even uncomment that bit (and the LoadArc call in main) if you have arclib and derelict installed, and uncomment that bit at the top of sample.md for a demo of it. (Note that there's a bug with derelict and GDC on posix, where it gives a segfault or illegal instruction upon initialization of SDL...)
List:
Added/Removed
- Added the ability to wrap structs in minid.bind. Only problem is private struct members; wrapping structs that have private members fails. There's no way for me to work around this, as far as I can tell.
- Added minid.utils.ToUTFx templates to convert between Unicode encodings at compile time.
Changed
Massive overhaul of minid.bind in order to get around DMDWin's symbol length issues. Now uses a method-style wrapping pattern instead of variadic templates. Thankfully this doesn't mean any sacrifice in features, since the binding library isn't nearly as complex as Pyd and doesn't really have to have everything available at compile time.
Fixed
- With minid.bind, wrapped functions and methods with optional parameters that can be called with no parameters now work correctly.
- Error messages in minid.bind about minimum numbers of parameters are now correct.
- StringBuffer.length now gives an error if you try to set it to a negative number.
All the docs have also been updated, and there's quite a bit more in the minid.bind docs. |
|