neovim/neovim — pull request #705 by elmart (2014-05-08 16:33:40+00:00)
Title: [RFC] Remove project int types: Case long_u: do_outofmem_msg.

Remove long_u occurrences due to do_outofmem_msg's size parameter.
To achieve that:
- If possible, remove do_outofmem_msg's occurrence altogether.
That requires making functions vim_strsave and vim_strnsave use the
new safe memory functions (xmalloc). Once that is done, corresponding
checks for null can be removed (thus deleting do_outofmem_msg call).
Some more possible refactoring work on vim_strsave and vim_strnsave
and their callers is left to be done, as not essential to this task.
- For the remaining occurrences of do_outofmem_msg, refactor it to take
a size_t 'size' parameter instead of a long_u.

@philix @watk
As a need of my ongoing work to remove `long_u`, I stumped into the need of slightly modifying `vim_strsave` and `vim_strnsave` to use `xmalloc`. As I explain above, I've left TODO's on those functions because work of the type you were doing (removing checks for null allocations, and some other things related) can be done there.
I leave that as TODO's in order not to collide with you again.
If you are not planning to tackle those cases soon, please say it to me so that I can fix that myself.