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.