Anyways, isn't tmp going to underflow as you push it (not gaining reference) and then pop it through calling f_replace (loosing one reference)? Perhaps ref_push_string(tmp) works better?
out of curiosity, exactly what causes a ref to be lost when calling (f_replace, for example?) is it the fact that f_replace pops the string when it's done with it, or is there some other mechanism?
I have a general understanding of how ref counting works, but was just curious from an implimentation standpoint.
Bill