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
redis
Commits
8fc67080
"vscode:/vscode.git/clone" did not exist on "4e6dd7bc86ccb0dcf47c9a6e712ff51a28162cf6"
Commit
8fc67080
authored
Apr 28, 2016
by
Dvir Volk
Committed by
antirez
May 10, 2016
Browse files
second attempt at vector formtting
parent
7f5e1340
Changes
1
Show whitespace changes
Inline
Side-by-side
src/module.c
View file @
8fc67080
...
@@ -2044,7 +2044,18 @@ robj **moduleCreateArgvFromUserFormat(const char *cmdname, const char *fmt, int
...
@@ -2044,7 +2044,18 @@ robj **moduleCreateArgvFromUserFormat(const char *cmdname, const char *fmt, int
long
ll
=
va_arg
(
ap
,
long
long
);
long
ll
=
va_arg
(
ap
,
long
long
);
argv
[
argc
++
]
=
createStringObjectFromLongLong
(
ll
);
argv
[
argc
++
]
=
createStringObjectFromLongLong
(
ll
);
}
else
if
(
*
p
==
'v'
)
{
}
else
if
(
*
p
==
'v'
)
{
/* TODO: work in progress. */
/* a vector of strings */
robj
**
v
=
va_arg
(
ap
,
void
*
);
size_t
vlen
=
va_arg
(
ap
,
size_t
);
/* We need to grow argv by N-1 elements */
argv_size
+=
vlen
-
1
;
argv
=
zrealloc
(
argv
,
sizeof
(
robj
*
)
*
argv_size
);
size_t
i
=
0
;
for
(
i
=
0
;
i
<
vlen
;
i
++
)
{
incrRefCount
(
v
[
i
]);
argv
[
argc
++
]
=
v
[
i
];
}
}
else
if
(
*
p
==
'!'
)
{
}
else
if
(
*
p
==
'!'
)
{
if
(
flags
)
(
*
flags
)
|=
REDISMODULE_ARGV_REPLICATE
;
if
(
flags
)
(
*
flags
)
|=
REDISMODULE_ARGV_REPLICATE
;
}
else
{
}
else
{
...
...
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