09/06/2006
Perl XS and SWIG interface to CLucene C++ text search engine
18
SWIG Definition File clucene.i
l%module "FulltextSearch::CLuceneWrap"
l%{
l#include "clucene_dllp.h"
l%}
l// our definitions for CLucene variables and functions
l%include "clucene_perl.h"
l//%include "clucene_dll.h" // could use this but then would need to call CL_N_Se
larch not CL_SEARCH etc.
l
l%include typemaps.i
l
l%include argv.i
l
l// helper functions where pointers to result buffers are expected
l// would be better done with a %typemap(out) if I knew enough about perlguts
l
l%inline %{
l
lint val_len;
lchar * val;
l
lint CL_GetField1(int resource, char * field)
l{
l        return CL_GETFIELD(resource,field,&val,&val_len);
l}
l…
l}