Passing scalars to C functions

[email protected] (Josef Moellers)
Newsgroups perl.xs
Organization Fujitsu Technology Solutions
Message-ID <[email protected]>
Hi,

I'm fairly new to the XS business. I have managed to get the skeleton up 
(h2xs) and have also managed to write short functions that have ints as 
arguments and return strings, but I'd like to pass a full Perl scalar 
(my $cdb = pack('C*', 0x12, 0, 0, 0, 128, 0);) and retrieve the length 
(6) and the bytes themselves in the C function and also return such a 
scalar.

How do I do that?

Thanks,

Josef

-- 
These are my personal views and not those of Fujitsu Technology Solutions!
Josef Möllers (Pinguinpfleger bei FTS)
	If failure had no penalty success would not be a prize (T.  Pratchett)
Company Details: http://de.ts.fujitsu.com/imprint.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.