On Aug 25, 10:08 pm, [EMAIL PROTECTED] (Patrick Dupre) wrote: > Hello, > > I need to make a XPUSHs of a referene on an array, but XPUSHs takes only > scalar
I find no problem in XPUSHs'ing an AV on perl 5.10. Here's a simple Inline::C demo: ------------------------------------------ use warnings; use strict; use Inline C => Config => BUILD_NOISY => 1; use Inline C => <<'EOC'; void foo(AV * x) { dXSARGS; av_push(x, newSViv(456)); XPUSHs(x); XSRETURN(1); } EOC my @init = (123); my $ret = foo([EMAIL PROTECTED]); print "@$ret\n"; # prints '123 456' as expected ------------------------------------------ However, the 'XPUSHs(x)' does produce an "assignment from incompatible pointer type" warning - but that's easily taken care of by casting the AV to an SV asa follows: XPUSHs((SV*)x); Cheers, Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/