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

Re^2: 'packlist'/'unpackstring' in XS

by Anonymous Monk
on Mar 22, 2017 at 04:37 UTC ( [id://1185399]=note: print w/replies, xml ) Need Help??


in reply to Re: 'packlist'/'unpackstring' in XS
in thread 'packlist'/'unpackstring' in XS

char *str = "Preved!!!"; char *pat = "C*"; dSP; PUTBACK; int n = unpackstring(pat, pat + 2, str, str + strlen(str), 0); SPAGAIN; AV* array2 = POPs; printf("%d, %d\n", n, av_len(array2)); =>>> 9, 44939024
array2 is not a array pointer after POPs...

Replies are listed 'Best First'.
Re^3: 'packlist'/'unpackstring' in XS
by Anonymous Monk on Mar 22, 2017 at 04:46 UTC
    Thank you all, I found a solution
    for (int c = n - 1; c >= 0; c--) { int a = POPi; printf("%c\n", a); }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-04-24 07:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found