Skip to content

Commit f6bfa7e

Browse files
committed
[Backtracing] Change the return type of one of the paths functions.
Since it's copying, it may as well return `char *` instead of `const char *`. rdar://103071801
1 parent c75793f commit f6bfa7e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/swift/Runtime/Paths.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ swift_getRootPath();
7373
/// \return A string containing the full path to the executable. This string
7474
/// should be released with `free()` when no longer required.
7575
SWIFT_RUNTIME_EXPORT
76-
const char *
76+
char *
7777
swift_copyAuxiliaryExecutablePath(const char *name);
7878

7979
#endif // SWIFT_RUNTIME_PATHS_H

stdlib/public/runtime/Paths.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ _swift_win32NameFromNTName(LPWSTR pszFilename) {
356356
} // namespace
357357

358358
SWIFT_RUNTIME_EXPORT
359-
const char *
359+
char *
360360
swift_copyAuxiliaryExecutablePath(const char *name)
361361
{
362362
const char *rootPath = swift_getRootPath();

0 commit comments

Comments
 (0)