Age | Commit message (Collapse) | Author | Files | Lines |
|
An sds string can hold a much bigger value than an int can hold, but
since size_t is unsigned it can’t be used for this function. Using
ptrdiff_t limits the function to work on roughly 1 Exabyte long strings,
but if you need to work with longer ones you probably will have your
custom string library already.
|
|
|
|
|
|
Use the returned value of sdsheader directly in the return call instead
of using a temporary variable since we’re not doing pointer arithmetic
directly in the sdslen and sdsavail functions anymore.
|
|
All source code should be indented with tabs and aligned with spaces.
When talking about line length a tab equals 4 spaces.
|
|
|
|
|
|
Remove the unnecessary casting of the pointer arithmetic result in
sdslen and sdsavail to a void pointer since it will already be an
sdshdr struct.
|
|
This reverts commit c636fc6cd25e455a75dca24ac08ba736f62db6c8.
This commit was just utterly senseless, all it does is make the code
less clear for literally nothing.
|
|
It’s reserved for the implementation and shouldn’t be used.
|
|
|
|
|