mirror of
https://github.com/neovim/neovim.git
synced 2024-12-25 13:45:15 -07:00
Replace vim_free() implementation
This replaces the vim_free() implementation with a free() call and adds a deprecated flag for the doxygen documentation.
This commit is contained in:
parent
e42a3cc4e6
commit
c5cac800e7
14
src/misc2.c
14
src/misc2.c
@ -634,16 +634,14 @@ int copy_option_part(char_u **option, char_u *buf, int maxlen, char *sep_chars)
|
||||
return len;
|
||||
}
|
||||
|
||||
/*
|
||||
* Replacement for free() that ignores NULL pointers.
|
||||
* Also skip free() when exiting for sure, this helps when we caught a deadly
|
||||
* signal that was caused by a crash in free().
|
||||
*/
|
||||
///
|
||||
/// Replacement for free().
|
||||
///
|
||||
/// @deprecated Use free() instead
|
||||
///
|
||||
void vim_free(void *x)
|
||||
{
|
||||
if (x != NULL && !really_exiting) {
|
||||
free(x);
|
||||
}
|
||||
free(x);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user