Fix allocate_string in api.txt