- or download this
SV *buildA(A& a)
{
...
addBs(a_sv, b_svs);
return a_sv;
}
- or download this
void
addBs(SV *a_sv, std::vector<SV*> &b_svs)
...
FREETMPS;
LEAVE;
}
- or download this
void get_a( )
PPCODE:
A a = getAFromSomewhere( );
SV *a_sv = buildA(a);
XPUSHs(sv_2mortal(a_sv));