Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2013-11-20 22:22:27 +0400
committerJoel Sherrill <joel.sherrill@oarcorp.com>2013-11-20 22:22:27 +0400
commit3c7451d8de9b4ec70c8b9fb444d47bec9e06e038 (patch)
treeb31ff17944b6834ea806df68ea2d5c35004aaf9c
parentea9d80921f04e6f4f2f97f0984f002a98acd92b0 (diff)
2013-11-20 Daniel Ramirez <javamonn@gmail.com>
* libc/include/search.h, libc/search/tdelete.c: Add restrict keyword.
-rw-r--r--newlib/ChangeLog4
-rw-r--r--newlib/libc/include/search.h2
-rw-r--r--newlib/libc/search/tdelete.c4
3 files changed, 7 insertions, 3 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 418493e6c..420019d1e 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,7 @@
+2013-11-20 Daniel Ramirez <javamonn@gmail.com>
+
+ * libc/include/search.h, libc/search/tdelete.c: Add restrict keyword.
+
2013-11-20 Chirayu Desai <chirayudesai1@gmail.com>
* libc/include/regex.h, libc/posix/regcomp.c,
diff --git a/newlib/libc/include/search.h b/newlib/libc/include/search.h
index db2c48f5b..ed321b0f6 100644
--- a/newlib/libc/include/search.h
+++ b/newlib/libc/include/search.h
@@ -54,7 +54,7 @@ ENTRY *hsearch(ENTRY, ACTION);
int hcreate_r(size_t, struct hsearch_data *);
void hdestroy_r(struct hsearch_data *);
int hsearch_r(ENTRY, ACTION, ENTRY **, struct hsearch_data *);
-void *tdelete(const void *, void **, __compar_fn_t);
+void *tdelete(const void *__restrict, void **__restrict, __compar_fn_t);
void tdestroy (void *, void (*)(void *));
void *tfind(const void *, void **, __compar_fn_t);
void *tsearch(const void *, void **, __compar_fn_t);
diff --git a/newlib/libc/search/tdelete.c b/newlib/libc/search/tdelete.c
index e75659913..b607b5421 100644
--- a/newlib/libc/search/tdelete.c
+++ b/newlib/libc/search/tdelete.c
@@ -27,8 +27,8 @@ __RCSID("$NetBSD: tdelete.c,v 1.2 1999/09/16 11:45:37 lukem Exp $");
/* delete node with given key */
void *
_DEFUN(tdelete, (vkey, vrootp, compar),
- const void *vkey _AND /* key to be deleted */
- void **vrootp _AND /* address of the root of tree */
+ const void *__restrict vkey _AND /* key to be deleted */
+ void **__restrict vrootp _AND /* address of the root of tree */
int (*compar)(const void *, const void *))
{
node_t **rootp = (node_t **)vrootp;