[sword-devel] Development, SWIG Bindings, etc...

brian brianlovesjesus at perffection.com
Sat Jan 7 15:59:10 MST 2012


Hey Everyone, God bless you
   Hope you are enjoying your Saturday. Thank you for your welcoming
notes (public/private) and ideas. I am looking more into the code, and
different projects. I'd like to help with Xyphos, or the windows
software if I can get it to compile with mingw or find a windows dev
box, though right now i'm looking more into SWIG.
   To get SWIG to work on the SVN branch (This is to get it to compile,
and it allows it to work but I still haven't gone over all the warnings
which seem mostly due to operator overloading) , the problem lies in
that SWBuf::append(wchar_t) which is new is not yet fully supported by
SWIG. We can remove its usage by editing swbuf.i and adding at line 29:

    %ignore sword::SWBuf::append(wchar_t);

SWBuf::append will still work for other datatypes like char.

another option is to edit sword.i (or the swig interface files) and add
functionality for wchar. I am still testing it, but adding something
like this on line 9 should work for now:

|%fragment("SWIG_AsVal_wchar_t", "header", fragment="<wchar.h>") {
SWIGINTERN int SWIG_AsVal_wchar_t(SV* p, wchar_t* val) {
    long v;
    int res;    
    res = SWIG_AddCast(SWIG_AsVal_long(p, &v));
    if (SWIG_IsOK(res)) {
      if (val) *val = static_cast< wchar_t >(v);
    }
  return res;
}
}|

either solution will allow compilation and useful functionality. On SVN
i've needed to alter the makefiles that are included by sword to get it
to compile the final library. I will try to spend some time making the
bindings compile and work. If any of you can try out the rsword gem it
would be neat (gem install rsword), and any general comments to be able
to make it ready for production.

In Christ, God bless you
 -brian



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20120107/3bf197d7/attachment.html>


More information about the sword-devel mailing list