diff options
author | Eliseo Martínez <eliseomarmol@gmail.com> | 2014-05-24 01:17:47 +0200 |
---|---|---|
committer | Eliseo Martínez <eliseomarmol@gmail.com> | 2014-05-24 01:17:47 +0200 |
commit | ec89761e8a05fb93ed6bbde1055fbc866f7bce7e (patch) | |
tree | b2efee00f796761bb7362489ea4ba3d17f378720 /scripts/msgpack-gen.lua | |
parent | 0c68623aca08fa84c7ed945bac7d5066de84d7f7 (diff) | |
download | rneovim-ec89761e8a05fb93ed6bbde1055fbc866f7bce7e.tar.gz rneovim-ec89761e8a05fb93ed6bbde1055fbc866f7bce7e.tar.bz2 rneovim-ec89761e8a05fb93ed6bbde1055fbc866f7bce7e.zip |
Remove long_u: hashtab: Refactor long_u type.
hashtab.h:
- hash_T: long_u -> size_t.
In principle, a hash value could thought of as just an unsigned number
without size semantics (uint32_t or uint64_t). But it is used as
index at some places, and so, size_t is also eligible. Therea re some
places where assignments occur between hash_T and size_t variables, in
both directions. Therefore, if we define hash_T to be of a type having
a different width than that of size_t, we will have an incorrect
assignment somewhere that will require an assert/guard. So the most
sensible option here seems to do hast_T to be size_t too.
- hashtab_T.ht_mask: long_u -> hash_T.
Masks are used to be combined with hash_T values, so they should be of
the same type.
hashtab.c:
- hash_may_resize(): oldsize: long_u -> size_t.
- hash_may_resize(): newsize: long_u -> size_t.
- hash_may_resize(): newmask: long_u -> hash_T.
Diffstat (limited to 'scripts/msgpack-gen.lua')
0 files changed, 0 insertions, 0 deletions