Mailing List Archive

SvGROW broken?
I am playing around with some C code called by perl.

It says:

I32 n;
SV* work;
work = sv_newmortal();

...


SvGROW( work, 4*(n+1) ); /* Pregrow for efficiency. Broken??? */

...


Gives me a Segmentation violation (n is 99).

Is this a bug or a misunderstanding on my part? My
code works fine if I comment it out but I want to
pregrow the array as I will be storing long strings in it.

This is perl5.001m on SunOS 4.1.4 2 sun4m

BTW anyone know how to tell if a SV* holds a GLOB?


[.cc:ed comp.lang.perl.misc - porters please reply
by email direct as I am not subsrcribed]

Karl
--
kgb@aaoepp.aao.gov.au [Anglo-Australian Observatory]
----> pubs: http://www.ast.cam.ac.uk/~kgb/papers.html
----> pgperl: http://www.ast.cam.ac.uk/~kgb/pgperl.html