mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 06:58:35 +00:00
Remove char_u: vim_settempdir()
This commit is contained in:
@@ -45,7 +45,7 @@ static void vim_maketempdir(void)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vim_settempdir(path)) {
|
if (vim_settempdir((char *)path)) {
|
||||||
// Successfully created and set temporary directory so stop trying.
|
// Successfully created and set temporary directory so stop trying.
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
@@ -100,15 +100,15 @@ char_u *vim_gettempdir(void)
|
|||||||
/// @param tempdir must be no longer than MAXPATHL.
|
/// @param tempdir must be no longer than MAXPATHL.
|
||||||
///
|
///
|
||||||
/// @return false if we run out of memory.
|
/// @return false if we run out of memory.
|
||||||
static bool vim_settempdir(char_u *tempdir)
|
static bool vim_settempdir(char *tempdir)
|
||||||
{
|
{
|
||||||
char_u *buf = verbose_try_malloc((size_t)MAXPATHL + 2);
|
char *buf = verbose_try_malloc(MAXPATHL + 2);
|
||||||
if (!buf) {
|
if (!buf) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
vim_FullName((char *)tempdir, (char *)buf, MAXPATHL, false);
|
vim_FullName(tempdir, buf, MAXPATHL, false);
|
||||||
add_pathsep((char *)buf);
|
add_pathsep(buf);
|
||||||
vim_tempdir = vim_strsave(buf);
|
vim_tempdir = (char_u *)xstrdup(buf);
|
||||||
xfree(buf);
|
xfree(buf);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user