refactor: remove use of reserved c++ keywords

libnvim couldn't be easily used in C++ due to the use of reserved keywords.

Additionally, add explicit casts to *alloc function calls used in inline
functions, as C++ doesn't allow implicit casts from void pointers.
This commit is contained in:
ii14
2023-04-06 22:39:50 +02:00
committed by GitHub
parent 0bc3238504
commit 7190dba017
21 changed files with 152 additions and 154 deletions

View File

@@ -5428,10 +5428,9 @@ char *vim_tempname(void)
// There is no need to check if the file exists, because we own the directory
// and nobody else creates a file in it.
char template[TEMP_FILE_PATH_MAXLEN];
snprintf(template, TEMP_FILE_PATH_MAXLEN,
"%s%" PRIu64, tempdir, temp_count++);
return xstrdup(template);
char templ[TEMP_FILE_PATH_MAXLEN];
snprintf(templ, TEMP_FILE_PATH_MAXLEN, "%s%" PRIu64, tempdir, temp_count++);
return xstrdup(templ);
}
/// Tries matching a filename with a "pattern" ("prog" is NULL), or use the