>> On 2002-12-10, Belinda M. Giardine <[EMAIL PROTECTED]> said:

   > What is the difference between av_store and av_push?

av_store will store an SV in an array, taking an index to use.  av_push
is an implementation of Perl's push in XS; it will only push to the last
element in an array.  I'd imagine that av_push calls av_extend to ensure
that you're not going outside the boundaries of your array, whereas
av_store will let you assign out of bounds and cause badness.

I'm not sure if it's been mentioned, but _Extending and Embedding Perl_,
is a useful XS manual, published by Manning.  It has documentation on
av_store and av_push with sample XS code, along with the rest of of the 
Perl API and Perl's typemaps.  There's a fair review (though I think
I've found it far more helpful as an XS beginner than Nick suggests)
at < http://london.pm.org/reviews/extending-and-embedding-perl.html >.

   > Bizarre copy of ARRAY in aassign at test_gala_query line 3958,
   > <STDIN> line 14. Segmentation Fault

perldoc perldiag says:

   Bizarre copy of %s in %s
      (P) Perl detected an attempt to copy an internal value
      that is not copyable.

.. but I'm afraid I'm not sure where that applies to your code.  Perhaps
someone else will be able to explain.  :-)

Hope this helps a little,

- Chris.
-- 
$a="printf.net";  Chris Ball | chris@void.$a | www.$a | finger: chris@$a
|  Q. How do you tell an extrovert techie from an introvert techie?
|  A. He looks at your feet rather than his own.

Reply via email to