消歧义chsrc_make_tmpfile的参数

This commit is contained in:
Mikachu2333 2025-10-01 15:55:29 +08:00 committed by 曾奥然
parent 5ccd609dd6
commit f92ebbee04

View File

@ -1387,14 +1387,14 @@ chsrc_run_directly (const char *cmd)
* @brief * @brief
* *
* @param[in] filename * @param[in] filename
* @oaram[in] postfix '.' * @param[in] postfix '.'
* @oaram[in] loud * @param[in] loud
* @param[out] tmpfilename NULL * @param[out] tmpfilepath Windows NULL
* *
* @return FILE* * @return FILE*
*/ */
FILE * FILE *
chsrc_make_tmpfile (char *filename, char *postfix, bool loud, char **tmpfilename) chsrc_make_tmpfile (char *filename, char *postfix, bool loud, char **tmpfilepath)
{ {
#ifdef XY_Build_On_Windows #ifdef XY_Build_On_Windows
/** /**
@ -1430,18 +1430,18 @@ chsrc_make_tmpfile (char *filename, char *postfix, bool loud, char **tmpfilename
/** /**
* FILE* * FILE*
* /tmp * /tmp
* Windows Windows * Windows Windows
*/ */
if (xy.on_windows && !tmpfilename) if (xy.on_windows && !tmpfilepath)
{ {
chsrc_error2 ("在 Windows 上,创建临时文件时必须指定返回的临时文件名"); chsrc_error2 ("在 Windows 上,创建临时文件时必须指定返回的临时文件名");
xy_unreached(); xy_unreached();
} }
if (tmpfilename) if (tmpfilepath)
{ {
*tmpfilename = xy_strdup (tmpfile); *tmpfilepath = xy_normalize_path (xy_strdup (tmpfile));
} }
return f; return f;