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
0cacb485
Commit
0cacb485
authored
Jan 05, 2015
by
Matt Stancliff
Browse files
Fix sds building with C++
These should really just be macros to shut up our type system.
parent
6a00a464
Changes
1
Hide whitespace changes
Inline
Side-by-side
sds.h
View file @
0cacb485
...
...
@@ -45,12 +45,12 @@ struct sdshdr {
};
static
inline
size_t
sdslen
(
const
sds
s
)
{
struct
sdshdr
*
sh
=
(
void
*
)(
s
-
sizeof
*
sh
);
struct
sdshdr
*
sh
=
(
struct
sdshdr
*
)(
s
-
sizeof
*
sh
);
return
sh
->
len
;
}
static
inline
size_t
sdsavail
(
const
sds
s
)
{
struct
sdshdr
*
sh
=
(
void
*
)(
s
-
sizeof
*
sh
);
struct
sdshdr
*
sh
=
(
struct
sdshdr
*
)(
s
-
sizeof
*
sh
);
return
sh
->
free
;
}
...
...
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