Ryan C. Gordon
icculus at icculus.org
Mon Feb 1 19:27:26 EST 2010
> SWIG sounds promising. Has anybody experience with it, especially with C++
SWIG can do C++, but only in limited ways. For instance, classes can be
done; templates: not really. You can handle operator and method
overloading, but it requires some tapdancing.
Since PhysicsFS's public API is completely C-callable, it's not a
SWIG doesn't, however, support callbacks. So you can't use
PHYSFS_enumerateFilesCallback() and have PhysicsFS jump back into, say,
a Python function. Hopefully they'll add this at some point.
That being said, a first shot at Perl bindings using SWIG are now in the
default branch. I'm still working on it. There's a basic definition
language available to SWIG so we can make some things more Perl-like
(etc) than a simple wrapper over the PhysicsFS API.
Jury's still out on SWIG. This is all experimental at this point, so I
might replace it with something else, still. I could definitely see lots
of scenarios where SWIG would be awesome, though.
More information about the physfs