See perlapi, Extending and Embedding Perl, and as much of the source code as you can stand.
In reply to Re: XS code block by chromatic in thread XS code block by cyberity