diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-02 20:22:53 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-02 20:22:53 +0000 |
commit | d89544043ea9f68f715f97319d1f7f5c2d937d03 (patch) | |
tree | 2315dba799b75e82626b3d6a56395a4b471a4368 /libcpp/internal.h | |
parent | d1d116197acb550c188ac6a36fe5ab664d4d667f (diff) | |
download | gcc-d89544043ea9f68f715f97319d1f7f5c2d937d03.tar.gz |
2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
* internal.h (uxstrdup, ustrchr): Return const unsigned char *.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180796 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp/internal.h')
-rw-r--r-- | libcpp/internal.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libcpp/internal.h b/libcpp/internal.h index e60330df490..b3dc2df10bf 100644 --- a/libcpp/internal.h +++ b/libcpp/internal.h @@ -739,8 +739,8 @@ static inline int ustrcmp (const unsigned char *, const unsigned char *); static inline int ustrncmp (const unsigned char *, const unsigned char *, size_t); static inline size_t ustrlen (const unsigned char *); -static inline unsigned char *uxstrdup (const unsigned char *); -static inline unsigned char *ustrchr (const unsigned char *, int); +static inline const unsigned char *uxstrdup (const unsigned char *); +static inline const unsigned char *ustrchr (const unsigned char *, int); static inline int ufputs (const unsigned char *, FILE *); /* Use a const char for the second parameter since it is usually a literal. */ @@ -770,16 +770,16 @@ ustrlen (const unsigned char *s1) return strlen ((const char *)s1); } -static inline unsigned char * +static inline const unsigned char * uxstrdup (const unsigned char *s1) { - return (unsigned char *) xstrdup ((const char *)s1); + return (const unsigned char *) xstrdup ((const char *)s1); } -static inline unsigned char * +static inline const unsigned char * ustrchr (const unsigned char *s1, int c) { - return (unsigned char *) strchr ((const char *)s1, c); + return (const unsigned char *) strchr ((const char *)s1, c); } static inline int |