Discussion:
How can I push an AV * onto the stack?
(too old to reply)
Ben Bullock
2013-03-24 03:01:24 UTC
Permalink
Is there a way to push an AV * onto the stack as an array?

Right now I have the following:

if (wantarray) {
EXTEND (SP, av_len (wantarray));
for (i = 0; i <= av_len (wantarray); i++) {
PUSHs (sv_2mortal (*(av_fetch (wantarray, i, 0))));
}
}

See:

https://github.com/benkasminbullock/Text-Fuzzy/blob/master/Fuzzy.xs#L163

Is there a better way to do it?
bulk88
2013-03-24 22:07:07 UTC
Permalink
This post might be inappropriate. Click to display it.
bulk88
2013-03-25 02:24:24 UTC
Permalink
This post might be inappropriate. Click to display it.
Loading...