123456789101112131415161718192021222324252627282930313233 |
- $OpenBSD: patch-cmn_utils_h,v 1.1 2017/05/02 23:26:32 espie Exp $
- If you're going to wrap C++ functions, you need both const correct wrappers.
- Index: cmn/utils.h
- --- cmn/utils.h.orig
- +++ cmn/utils.h
- @@ -237,13 +237,22 @@ class Utils {
- /* EFFECTS: Wrapper for C library strcmp(). Return 0 if strings are the
- same. */
-
- - static char* strchr(const char* cs,int c)
- + static const char* strchr(const char* cs,int c)
- {return ::strchr(cs,c);}
-
- - static char* strrchr(const char* cs,int c)
- + static const char* strrchr(const char* cs,int c)
- {return ::strrchr(cs,c);}
-
- - static char* strstr(const char* cs,const char* ct)
- + static const char* strstr(const char* cs,const char* ct)
- + {return ::strstr(cs,ct);}
- +
- + static char* strchr(char* cs,int c)
- + {return ::strchr(cs,c);}
- +
- + static char* strrchr(char* cs,int c)
- + {return ::strrchr(cs,c);}
- +
- + static char* strstr(char* cs,const char* ct)
- {return ::strstr(cs,ct);}
-
- static void strcpy(char* s,const char* ct)
|