Use restrict on pointers where it makes sense. (requires C99 support,

which we already assume)
This commit is contained in:
Nils O. Selåsdal
2014-05-25 23:07:08 +02:00
parent a24aa93b73
commit 5bd23d751f
12 changed files with 37 additions and 37 deletions
+3 -3
View File
@@ -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
}