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

Example of usage, pls #13

Open
mgierw opened this issue Dec 30, 2019 · 0 comments
Open

Example of usage, pls #13

mgierw opened this issue Dec 30, 2019 · 0 comments

Comments

@mgierw
Copy link

mgierw commented Dec 30, 2019

Hi,
I would like to use your library, but I have no idea how to write even a simple example. Could you provide such an example, please?

I wrote some lines of code:

int val = 13;
wandder_encoder_t *enc = init_wandder_encoder();
wandder_encode_next(enc, WANDDER_TAG_INTEGER, WANDDER_CLASS_UNIVERSAL_PRIMITIVE, 1, &val, sizeof(val));
auto result = wandder_encode_finish(enc);
free_wandder_encoder(enc);

but the result is the following:

Encode error: not enough space for value
a.out: src/encoder.c:739: encode_pending: Assertion `0' failed.
Aborted (core dumped)
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

1 participant