summaryrefslogtreecommitdiff
path: root/lwlib/xlwmenuP.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@Penguin.CS.UCLA.EDU>2020-01-17 23:59:51 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2020-01-18 00:02:12 -0800
commitc1b6d5c5b9f8eee8aa3a8071292e8b3281ecf28a (patch)
treef484fd77b1eec8659d17531c39e1bff1301c5b33 /lwlib/xlwmenuP.h
parentbce3d89a6042da8830199d912c3b26aefaf7288c (diff)
downloademacs-c1b6d5c5b9f8eee8aa3a8071292e8b3281ecf28a.tar.gz
Improve performance when a string's byte count changes
* src/alloc.c (allocate_string_data): Now static. Remove code for when Faset calls this function when S already has data assigned, as that can no longer happen. (resize_string_data): New function, which avoids relocation in more cases than the old code did, by not bothering to relocate when the size changes falls within the alignment slop. * src/data.c (Faset): Use resize_string_data. Change a while to a do-while since it must iterate at least once.
Diffstat (limited to 'lwlib/xlwmenuP.h')
0 files changed, 0 insertions, 0 deletions