aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer_defs.h
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2016-10-30 23:18:29 -0400
committerJames McCoy <jamessan@jamessan.com>2016-11-02 10:06:26 -0400
commit87ff2682d7856c508311eeab5bd65c2505fc61d3 (patch)
treea25e72c29a2a8dc12310962d897a96fdf92f38c1 /src/nvim/buffer_defs.h
parent349fa0048b7d45875daf96eefca0da163cd3a82f (diff)
downloadrneovim-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/buffer_defs.h')
-rw-r--r--src/nvim/buffer_defs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/buffer_defs.h b/src/nvim/buffer_defs.h
index ab5987612c..483e30109c 100644
--- a/src/nvim/buffer_defs.h
+++ b/src/nvim/buffer_defs.h
@@ -488,7 +488,7 @@ struct file_buffer {
bool file_id_valid;
FileID file_id;
- bool b_changed; /* 'modified': Set to true if something in the
+ int b_changed; /* 'modified': Set to true if something in the
file has been changed and not written out. */
int b_changedtick; /* incremented for each change, also for undo */
@@ -655,7 +655,7 @@ struct file_buffer {
long b_p_sts; ///< 'softtabstop'
long b_p_sts_nopaste; ///< b_p_sts saved for paste mode
char_u *b_p_sua; ///< 'suffixesadd'
- bool b_p_swf; ///< 'swapfile'
+ int b_p_swf; ///< 'swapfile'
long b_p_smc; ///< 'synmaxcol'
char_u *b_p_syn; ///< 'syntax'
long b_p_ts; ///< 'tabstop'