Accessing variables from inside a C-XS

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

I'd like to access a Perl-variable (a scalar) from within an XS. I do
accept that the scalar may not (yet) exists, so I'd cater for that:

if (var_exists("$scsi_timeout"))
    timeout = strtoul(..., &next, 0);
else
    timeout = DEFAULT_TIMEOUT;

How do I do that:
- find out if a scalar exists
- access the contents of the scalar.

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.