Thanks, Nicholas !!
You are right they are not quite "introduced" in the Cookbook either.
Nitin
Nicholas Clark wrote:
On Mon, Dec 06, 2004 at 09:23:06PM -0500, Nitin Madnani wrote:
Is it possible to access global variables declared in perl space from an
Inlined C function ?
get_sv()/get_av(
On Mon, Dec 06, 2004 at 09:23:06PM -0500, Nitin Madnani wrote:
> Is it possible to access global variables declared in perl space from an
> Inlined C function ?
get_sv()/get_av()/get_hv() is probably what you need. They're documented
in the perlapi man page, which is a reference on all perl API
Thanks to Sisyphus & Eric Wilhelp for excellent answers to my question !!
I have another (I think the answer is no, but I just wanted to be sure
since I could not find anything in the mailing list) :
Is it possible to access global variables declared in perl space from an
Inlined C function ?
T
# The following was supposedly scribed by
# Nitin Madnani
# on Saturday 04 December 2004 12:55 am:
> array = SvRV(arr);
>
> *
>}
>
>* Here is where I am stumped ... don't know what to do next, I have
> to get the second array reference out from this array reference
> rig
Hi Everyone
I am learning Inline:C for perl and I just wanted to try something
like this :
use Inline C => DATA =>;
# Initialize variables
$num = 10;
@numarr = ();
# Given an array reference, this subroutine assigns an array reference
# to each element of the given array - making a 2-dimensional ar
Nitin Madnani wrote:
An interesting question - and one I was unable to answer off the top of
my head. Here's something that works. I've used a different script
layout ... but that's not part of the solution it's just that I
always arrange things like this :-)
use warnings;
use Inline C =>
Hi Everyone
I am learning Inline:C for perl and I just wanted to try something
like this :
use Inline C => DATA =>;
# Initialize variables
$num = 10;
@numarr = ();
# Given an array reference, this subroutine assigns an array reference
# to each element of the given array - making a 2-dimensional ar