I lied, it was 2 lines. ;-)
In Sablotron.xs:
char *foo = 0;
I think the reason *foo needed to be set to '0' is due to the free call, (and
setting it to something else, as I had done) resulted in it returning a
bunch of binary stuff, leading to me thinking it wasn't returning the right
stuff, when it was really trying to return "I don't have anything, because
there was a permission denied error on the log file".
In sablot.cpp:
void doStart()
{
situation.msgOutputFile("stderr","/tmp/sablot.log");
Log1(L_START, situation.timeStr());
};
Or, alternatively, chdir() in the mod_perl script someplace, because sablot
was trying to log to /sablot.log which was causing some problems.
Anyway, it was that simple. :-)
If I could make a suggestion, is there a way to get the error string after
processing? This way, the xs file could call croak() on an error, and possibly
just return the processed string on success. (Kind of like XML::Parser does)