Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: perl xs pass an array by reference

by bulk88 (Priest)
on Dec 06, 2012 at 22:05 UTC ( #1007661=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    return para[1] 
    
  2. or download this
    $str = pack('ddd', 1.0, 1.1, 1.3);
    
  3. or download this
    void
    func(doublearrsv)
    ...
        doublearr = SvPV(doublearrsv, len);//cast warning here
        if(len != sizeof(*doublearr)) croak("bad len");
        do_nothing(&doublearr[2]); //THIS WILL UPDATE IN PERL LAND
    
  4. or download this
    @array = unpack('ddd', $str);
    
  5. or download this
    @arr = ([11,12,13], [21,22,23], [31,32,33]);
    myxsub(@arr);
    
  6. or download this
    void
    myxsub(...)
    ...
             SV * sv =  ST(i);
             //do something
        }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1007661]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2014-09-22 03:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (178 votes), past polls