Skip to content

Commit

Permalink
Improve comment
Browse files Browse the repository at this point in the history
Signed-off-by: Viktor Söderqvist <[email protected]>
  • Loading branch information
zuiderkwast committed Jan 13, 2025
1 parent dce4a5c commit 2ba610a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/sds.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,13 @@ extern const char *SDS_NOINIT;
#include <stdarg.h>
#include <stdint.h>

typedef char *sds;
/* Constness:
*
* - 'const sds' means 'char * const'. It is a const-pointer to non-const content.
* - 'const_sds' means 'const char *'. It is a non-const pointer to const content.
* - 'const const_sds' means 'const char * const', const pointer and content. */

/* Constness: 'const sds' means 'char * const'. To get 'const char *', use
* 'const_sds'. To get both, you can use 'const const_sds' */
typedef char *sds;
typedef const char *const_sds;

/* Note: sdshdr5 is never used, we just access the flags byte directly.
Expand Down

0 comments on commit 2ba610a

Please sign in to comment.