Actually, I think what he really ought to do is
simple_array_index_no_free(Pike_sp, THIS->a, index); Pike_sp++;
and not bother with s/sval at all.
/ Marcus Comstedt (ACROSS) (Hail Ilpalazzo!)
Previous text:
2003-01-09 15:00: Subject: simple_array_index_no_free
PIKEFUN int `[](mixed index) { struct svalue *s;
simple_array_index_no_free(s, THIS->a, index);
^
Here's your problem; this is C, not C++. The concept of implicitly passing arguments by reference doesn't exist.
Try something like:
PIKEFUN int `[](mixed index) { struct svalue sval;
simple_array_index_no_free(&sval, THIS->a, index);
instead.
/ Henrik Grubbström (Lysator)