Use restrict on pointers where it makes sense. (requires C99 support,
which we already assume)
This commit is contained in:
@@ -52,7 +52,7 @@ int uc_strv_check_expand(struct UCStrv *strv);
|
||||
* @param str String to append, the string will be copied.
|
||||
* @return 0 on success, otherwise failure
|
||||
**/
|
||||
int uc_strv_append(struct UCStrv *strv, const char *str);
|
||||
int uc_strv_append(struct UCStrv *strv, const char *restrict str);
|
||||
|
||||
/**
|
||||
* Append a string to the strvec, nocopy variang.
|
||||
@@ -63,7 +63,7 @@ int uc_strv_append(struct UCStrv *strv, const char *str);
|
||||
* @param str the string to append
|
||||
* @return 0 on success, otherwise failure
|
||||
**/
|
||||
int uc_strv_append_nocopy(struct UCStrv *strv, char *str);
|
||||
int uc_strv_append_nocopy(struct UCStrv *strv, char *restrict str);
|
||||
|
||||
/**
|
||||
* Append a NULL pointer to the UCStrv, (cnt is not increased,
|
||||
@@ -98,7 +98,7 @@ void uc_strv_destroy(struct UCStrv *strv);
|
||||
* 0 to just append the same pointer in b to a
|
||||
* @return 0 on success, != 0 if appending/allocation fails
|
||||
*/
|
||||
int uc_strv_append_all(struct UCStrv *a, struct UCStrv *b, int copy);
|
||||
int uc_strv_append_all(struct UCStrv *restrict a, struct UCStrv *restrict b, int copy);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user