Commit 0c1dace3 by Paolo Carlini Committed by Paolo Carlini

internal.h (uxstrdup, ustrchr): Return const unsigned char *.

2011-11-02  Paolo Carlini  <paolo.carlini@oracle.com>

	* internal.h (uxstrdup, ustrchr): Return const unsigned char *.

From-SVN: r180796
parent 8fbf5688
2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
* internal.h (uxstrdup, ustrchr): Return const unsigned char *.
2011-11-02 Jason Merrill <jason@redhat.com> 2011-11-02 Jason Merrill <jason@redhat.com>
PR c++/50810 PR c++/50810
......
...@@ -739,8 +739,8 @@ static inline int ustrcmp (const unsigned char *, const unsigned char *); ...@@ -739,8 +739,8 @@ static inline int ustrcmp (const unsigned char *, const unsigned char *);
static inline int ustrncmp (const unsigned char *, const unsigned char *, static inline int ustrncmp (const unsigned char *, const unsigned char *,
size_t); size_t);
static inline size_t ustrlen (const unsigned char *); static inline size_t ustrlen (const unsigned char *);
static inline unsigned char *uxstrdup (const unsigned char *); static inline const unsigned char *uxstrdup (const unsigned char *);
static inline unsigned char *ustrchr (const unsigned char *, int); static inline const unsigned char *ustrchr (const unsigned char *, int);
static inline int ufputs (const unsigned char *, FILE *); static inline int ufputs (const unsigned char *, FILE *);
/* Use a const char for the second parameter since it is usually a literal. */ /* Use a const char for the second parameter since it is usually a literal. */
...@@ -770,16 +770,16 @@ ustrlen (const unsigned char *s1) ...@@ -770,16 +770,16 @@ ustrlen (const unsigned char *s1)
return strlen ((const char *)s1); return strlen ((const char *)s1);
} }
static inline unsigned char * static inline const unsigned char *
uxstrdup (const unsigned char *s1) 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) 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 static inline int
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment