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

Fix wrong integer en- and decoding in protobuf-c-text library. #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bwegge
Copy link

@bwegge bwegge commented Nov 18, 2014

  1. int{32,64} should be treated as signed integers (see https://developers.google.com/protocol-buffers/docs/proto#scalar)
  2. [u]int64 are [unsigned] long long integers on 32 bit platforms. The second patch uses inttypes.h macros for a compatible way to printf these integers, but this probably needs C99 where inttypes.h was officially introduced.

Benjamin Weggenmann added 2 commits November 19, 2014 12:00
[u]int64 is [unsigned] long *or* long long depending on the word size.
Use inttypes.h macros (C99) to use correct encoding on all architectures.
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

Successfully merging this pull request may close these issues.

1 participant