Ben Gamari pushed to branch wip/T26009 at Glasgow Haskell Compiler / GHC
Commits:
-
6a1cf6ff
by Ben Gamari at 2025-05-19T16:49:06-04:00
2 changed files:
Changes:
| ... | ... | @@ -13,7 +13,7 @@ |
| 13 | 13 | #include <wchar.h>
|
| 14 | 14 | #endif
|
| 15 | 15 | |
| 16 | -pathchar* pathdup(pathchar *path)
|
|
| 16 | +pathchar* pathdup(const pathchar *path)
|
|
| 17 | 17 | {
|
| 18 | 18 | pathchar *ret;
|
| 19 | 19 | #if defined(mingw32_HOST_OS)
|
| ... | ... | @@ -26,7 +26,7 @@ pathchar* pathdup(pathchar *path) |
| 26 | 26 | return ret;
|
| 27 | 27 | }
|
| 28 | 28 | |
| 29 | -pathchar* pathdir(pathchar *path)
|
|
| 29 | +pathchar* pathdir(const pathchar *path)
|
|
| 30 | 30 | {
|
| 31 | 31 | pathchar *ret;
|
| 32 | 32 | #if defined(mingw32_HOST_OS)
|
| ... | ... | @@ -50,7 +50,7 @@ pathchar* pathdir(pathchar *path) |
| 50 | 50 | return ret;
|
| 51 | 51 | }
|
| 52 | 52 | |
| 53 | -pathchar* mkPath(char* path)
|
|
| 53 | +pathchar* mkPath(const char* path)
|
|
| 54 | 54 | {
|
| 55 | 55 | #if defined(mingw32_HOST_OS)
|
| 56 | 56 | size_t required = mbstowcs(NULL, path, 0);
|
| ... | ... | @@ -66,7 +66,7 @@ pathchar* mkPath(char* path) |
| 66 | 66 | #endif
|
| 67 | 67 | }
|
| 68 | 68 | |
| 69 | -HsBool endsWithPath(pathchar* base, pathchar* str) {
|
|
| 69 | +HsBool endsWithPath(const pathchar* base, const pathchar* str) {
|
|
| 70 | 70 | int blen = pathlen(base);
|
| 71 | 71 | int slen = pathlen(str);
|
| 72 | 72 | return (blen >= slen) && (0 == pathcmp(base + blen - slen, str));
|
| ... | ... | @@ -37,9 +37,9 @@ |
| 37 | 37 | |
| 38 | 38 | #include "BeginPrivate.h"
|
| 39 | 39 | |
| 40 | -pathchar* pathdup(pathchar *path);
|
|
| 41 | -pathchar* pathdir(pathchar *path);
|
|
| 42 | -pathchar* mkPath(char* path);
|
|
| 43 | -HsBool endsWithPath(pathchar* base, pathchar* str);
|
|
| 40 | +p*athchar* pathdup(const pathchar *path);
|
|
| 41 | +pathchar* pathdir(const pathchar *path);
|
|
| 42 | +pathchar* mkPath(const char* path);
|
|
| 43 | +HsBool endsWithPath(const pathchar* base, const pathchar* str);
|
|
| 44 | 44 | |
| 45 | 45 | #include "EndPrivate.h" |