mirror of
https://github.com/albfan/miraclecast.git
synced 2025-03-09 23:38:56 +00:00
shl: util: add _shl_sentinel_ marker for strjoin
This is very handy to catch wrong usage of shl_strjoin(). We now get a gcc warning if the sentinel (NULL) is omitted. Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
This commit is contained in:
parent
77aae60c52
commit
5fb83c9159
1 changed files with 1 additions and 1 deletions
|
@ -84,7 +84,7 @@ void *shl_greedy_realloc0(void **mem, size_t *size, size_t need);
|
|||
/* string helpers */
|
||||
|
||||
char *shl_strcat(const char *first, const char *second);
|
||||
char *shl_strjoin(const char *first, ...);
|
||||
_shl_sentinel_ char *shl_strjoin(const char *first, ...);
|
||||
|
||||
static inline char *shl_startswith(const char *str, const char *prefix)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue