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

decoder: let get_simple() return NANOCBOR_OK, not number of bytes #90

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mguetschow
Copy link
Contributor

to match the docs

This aligns with most of the other nanocbor_get_* functions that also return NANOCBOR_OK instead of the number of bytes read.

However, while looking at this, I noticed the API to be slightly inconsistent as it returns the number of bytes for all number-related decoding functions such as nanocbor_get_{uint*,int*,float,double}. Was there a specific reason to do so or could we change those return values as well? In the end, the user shouldn't need to care about the amount of bytes that were consumed for a specific decoder function, right?

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