Oops - justy found this postponed message: looks complete-ish, can't see why
it was postponed, so:

On Thu, 27 Sep 2001, Billy Patton wrote:

> I have an xs file that I have doing stuff.
> Some is to search in my c database (home grown for data, unique to TI)
> 
> I believe that there is too much crunching going on in the xs that needs
> to

IMO, a good approach is to have separate .c or .cpp files containing 
your 'real' functions, and have the XS layer be as thin as possible an
interface between your perl and your C. The XS functions should really just
be the interface declaration bit, plus a little argument fiddling as
necessary to get from a list of perl arguments to something your C/C++ 
can use. Plus any extra fiddling required to get the results back into a
form perl will be happy with. (Extending the stack, etc).

-- 
Vivek

Reply via email to