On Thu, 1 Aug 2002, Michael G Schwern wrote:

> More chronicles of brainstorming from TPC.
> 
> Last year at TPC, Hugo asked for ideas about testing the internal C
> functions of Perl.  Testing perl itself is ok, but if we can test at an even
> finer grained level of the C API many bugs can be more easily caught.
> Additionally the documentation will be improved in the process (can't test
> it if you don't know what it's supposed to do) and the XS mechanism might
> also be improved as more people have to touch it to test it.
> 
> At the time, there was nothing to do this except write tests in C, and that
> sucks.  It's hard enough to find people to write tests in Perl.

That's not strictly correct. There is nothing to stop an XS module
exporting the perl API and testing it using the normal testing modules. If
the Perl API is straightforward the XS interface will be straightforward
too (as will the Inline interface). perl 5.8 has XS::APItest (and
XS::Typemap - this module test quite a bit of the perl API in order to
even run) as a very simple start of that. The main difficulty is actually
in routines that have complicated arguments and initialisation
requirements.

I'm not objecting to Inline::C in the core, I'm just suggesting that the 
argument of "now we can test the API" is not the argument we should be 
making for it since you can already do it and it's not very difficult.

The only real difference is that Inline generates the XS automatically 
- presumably from the apidoc information.

> So, this is a request to place Inline::C into 5.9 to facilitate easy testing
> of the C API.

-- 
Tim Jenness
JAC software
http://www.jach.hawaii.edu/~timj


Reply via email to