forked from aniani/vim
patch 7.4.1058
Problem: It is not possible to test code that is only reached when memory allocation fails. Solution: Add the alloc_fail() function. Try it out with :vimgrep.
This commit is contained in:
@@ -1619,6 +1619,15 @@ EXTERN FILE *time_fd INIT(= NULL); /* where to write startup timing */
|
||||
EXTERN int ignored;
|
||||
EXTERN char *ignoredp;
|
||||
|
||||
#ifdef FEAT_EVAL
|
||||
/* set by alloc_fail(): ID */
|
||||
EXTERN int alloc_fail_id INIT(= 0);
|
||||
/* set by alloc_fail(), when zero alloc() returns NULL */
|
||||
EXTERN int alloc_fail_countdown INIT(= -1);
|
||||
/* set by alloc_fail(), number of times alloc() returns NULL */
|
||||
EXTERN int alloc_fail_repeat INIT(= 0);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Optional Farsi support. Include it here, so EXTERN and INIT are defined.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user