Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msgpack-c calls the double in msgpack_object_union illogically dec #191

Closed
ztane opened this issue Jan 14, 2015 · 3 comments
Closed

msgpack-c calls the double in msgpack_object_union illogically dec #191

ztane opened this issue Jan 14, 2015 · 3 comments
Assignees

Comments

@ztane
Copy link

ztane commented Jan 14, 2015

which most probably refers to "decimal", which the doubles after all are not, as they are encoded in IEEE-754 binary.

Furthermore, since the documentation seems to be "read the source", I had to read the headers to find it out.

@redboltz
Copy link
Contributor

@ztane, thank you for your comment.

which most probably refers to "decimal", which the doubles after all are not, as they are encoded in IEEE-754 binary.

True. It is misleading.

'dec' is corresponding to 'float format family':
https://github.com/msgpack/msgpack/blob/master/spec.md#float-format-family

It should have a different name. But it is already a part of public interface. It might break existing client codes. So I think that the next MAJOR version up is a good timing to change the name.

Furthermore, since the documentation seems to be "read the source", I had to read the headers to find it out.

I'm trying to improve the documentation. But it is under development.

Here is information about dec:

https://github.com/msgpack/msgpack-c/wiki/cpp_object#what-is-msgpackobject

Unfortunately it is in the picture. So it can't be hit as a search word.

By the way, I think that 'f64' is a good name. 'float' is reserved by the languace C/C++. 'f64' is the same mannar as 'i64' and 'u64'.

@nobu-k
Copy link
Member

nobu-k commented Jan 16, 2015

I discussed this with redboltz. Because we use union, we can add a new f64 field while maintaining obsolete dec field. So, we can fix this issue without losing compatibility. redboltz is now preparing a pull request for it.

@redboltz
Copy link
Contributor

I added a document on the wiki https://github.com/msgpack/msgpack-c/wiki/cpp_configure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants