mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-19 04:33:27 +02:00
Fixed #521.
Introduced new object type `FLOAT32` and `FLOAT64`. `FLOAT64` is equivalent to `FLOAT`. The both internal expressions are f64(double).
This commit is contained in:
@@ -151,7 +151,7 @@ static inline int template_callback_int64(unpack_user* u, int64_t d, msgpack_obj
|
||||
static inline int template_callback_float(unpack_user* u, float d, msgpack_object* o)
|
||||
{
|
||||
MSGPACK_UNUSED(u);
|
||||
o->type = MSGPACK_OBJECT_FLOAT;
|
||||
o->type = MSGPACK_OBJECT_FLOAT32;
|
||||
o->via.f64 = d;
|
||||
return 0;
|
||||
}
|
||||
@@ -159,7 +159,7 @@ static inline int template_callback_float(unpack_user* u, float d, msgpack_objec
|
||||
static inline int template_callback_double(unpack_user* u, double d, msgpack_object* o)
|
||||
{
|
||||
MSGPACK_UNUSED(u);
|
||||
o->type = MSGPACK_OBJECT_FLOAT;
|
||||
o->type = MSGPACK_OBJECT_FLOAT64;
|
||||
o->via.f64 = d;
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user