Mirar @ Pike developers forum wrote:
ref_push_string(MK_STRING("_datarowdesc"));
That's more or less what push_text does. I think. Possibly MK_STRING is better optimized via cmod? push_text seems to recreate the shared pointer every time.
MK_STRING does something very clever and rather optimal.
f_arrow(2); datarowdesc=Pike_sp[-1].u.array; pop_stack();
Possibly you either want to increase the reference counter of the array, or use Pike_sp--; instead of pop. (But maybe you do that already, or cmod does it magically for you?)
Good point. No, it doesn't happen, then again, program logic dictates that nobody is messing with that array, the only thing that could mess this up is an unexpected destruction of this object. I'll ponder it some more and see if this safeguard is necessary (and where I need it as well, because I use this construct on three or four items).
Incidentally, it's these silly things like, when to use push_string or when to use ref_push_string and the same for push_object vs. ref_push_object which take time to figure out.
Yes. :p
And the coredumps that follow don't really give enough clues.