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

Errors in the Reference Manual #79

Open
ghost opened this issue Jul 8, 2017 · 0 comments
Open

Errors in the Reference Manual #79

ghost opened this issue Jul 8, 2017 · 0 comments

Comments

@ghost
Copy link

ghost commented Jul 8, 2017

Use it like this:

sds s = sdsfromlonglong(10000);
printf("%d\n", (int) sdslen(s));

output> 5

Why did you get the number 5? This simply can not be

sds s1 = sdsnew("abcd");
sds s2 = sdsempty();
s[1] = 1;
s[2] = 2;
s[3] = '\n';
s2 = sdscatrepr(s2,s1,sdslen(s1));
printf("%s\n", s2);

output> "a\x01\x02\n"

Why the array s is not created but variables are assigned there? And it is not used in this code.

You have these errors, correct

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

0 participants