NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
PerlC array conversions (Score:1)
I don't have those sitting on my hard drive, but if C++ were a start, you could have a look at
http://cpansearch.perl.org/src/SMUELLER/SOOT-0.09/src/CPerlTypeConversion.h [perl.org]
and
http://cpansearch.perl.org/src/SMUELLER/SOOT-0.09/src/PerlCTypeConversion.h [perl.org]
No claim about the code not leaking, being efficient, elegant or correct.
Re: (Score:1)
I do magic (Score:1)
Specifically I store the pointer to the C structure in a magic attachment, so that it is not easily accessible from Perl.
For an example, you can check: FANN.xs [perl.org]
Though, I never go further, than that.