Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
hiredis
Commits
60e85fb4
Commit
60e85fb4
authored
May 18, 2010
by
antirez
Browse files
new newline needed after commands
parent
4f6fc6df
Changes
1
Hide whitespace changes
Inline
Side-by-side
example.c
View file @
60e85fb4
...
...
@@ -20,12 +20,12 @@ int main(void) {
freeReplyObject
(
reply
);
/* Set a key */
reply
=
redisCommand
(
fd
,
"SET %s %s
\n
"
,
"foo"
,
"hello world"
);
reply
=
redisCommand
(
fd
,
"SET %s %s"
,
"foo"
,
"hello world"
);
printf
(
"SET: %s
\n
"
,
reply
->
reply
);
freeReplyObject
(
reply
);
/* Set a key using binary safe API */
reply
=
redisCommand
(
fd
,
"SET %b %b
\n
"
,
"bar"
,
3
,
"hello"
,
5
);
reply
=
redisCommand
(
fd
,
"SET %b %b"
,
"bar"
,
3
,
"hello"
,
5
);
printf
(
"SET (binary API): %s
\n
"
,
reply
->
reply
);
freeReplyObject
(
reply
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment