diff options
author | James McCoy <jamessan@jamessan.com> | 2016-10-30 23:18:29 -0400 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2016-11-02 10:06:26 -0400 |
commit | 87ff2682d7856c508311eeab5bd65c2505fc61d3 (patch) | |
tree | a25e72c29a2a8dc12310962d897a96fdf92f38c1 /src/nvim/api/private/helpers.h | |
parent | 349fa0048b7d45875daf96eefca0da163cd3a82f (diff) | |
download | rneovim-87ff2682d7856c508311eeab5bd65c2505fc61d3.tar.gz rneovim-87ff2682d7856c508311eeab5bd65c2505fc61d3.tar.bz2 rneovim-87ff2682d7856c508311eeab5bd65c2505fc61d3.zip |
Use int as the standard type for boolean options.
All options are accessed by passing char_u pointers around, casting the
pointer to the right pointer type for the specific option, and then
dereferencing that pointer.
This dance works fine on little-endian systems when some bool options
are int types (as in Vim) and some are bool types (as would make more
sense), but on big-endian systems *(int *)varp when varp is pointing to
a bool will read random memory.
Therefore, all boolean options must remain a consistent type and int is
currently the easiest to choose.
Diffstat (limited to 'src/nvim/api/private/helpers.h')
0 files changed, 0 insertions, 0 deletions