There is a somewhat major difference between add_string_constant (not static) and push_constant_text (static + constant.:))
But I can agree that the string function names are rather messy. It is a rather big job to change them all to be consistent, however.
On Sat, Aug 22, 2015 at 11:52 AM, Arne Goedeke el@laramies.com wrote:
On 08/18/15 22:13, Per Hedbor () @ Pike (-) developers forum wrote:
Would it be OK to merge the split string code to pike 8.1?
I have done the merge to a private branch, and now wonder if it would be OK to push it upstream.
Could you push your merge as a branch? I recall that the code had a possible memory leak when allocating small strings in case an out of memory error happened. There are possibly also some other issues. At the time I realized that many of the APIs (like add_string_constant and others) make it impossible to correctly make use of static strings. As you point out, the current state could break with some external modules. Maybe the best alternative is to actually add an api, instead of requiring that the const char* arguments have program livetime.