Add handling for MSGPACK_OBJECT_FLOAT{32,64}

msgpack-c previously only had MSGPACK_OBJECT_FLOAT, which was a 64-bit
value.  Now, 32-bit and 64-bit floats are supported as distinct types,
but we'll simply continue to treat everything as 64-bit types.
This commit is contained in:
James McCoy
2017-03-30 11:06:26 -04:00
parent af2ee9c5d1
commit f4a3a96b68
2 changed files with 19 additions and 2 deletions

View File

@@ -973,7 +973,13 @@ int msgpack_to_vim(const msgpack_object mobj, typval_T *const rettv)
}
break;
}
case MSGPACK_OBJECT_FLOAT: {
#ifdef NVIM_MSGPACK_HAS_FLOAT32
case MSGPACK_OBJECT_FLOAT32:
case MSGPACK_OBJECT_FLOAT64:
#else
case MSGPACK_OBJECT_FLOAT:
#endif
{
*rettv = (typval_T) {
.v_type = VAR_FLOAT,
.v_lock = VAR_UNLOCKED,