forked from aniani/vim
patch 9.0.1097: tests are failing
Problem: Tests are failing. Solution: Do clean up a hashtab when at the initial size.
This commit is contained in:
@@ -405,10 +405,6 @@ hash_may_resize(
|
|||||||
return FAIL; // overflow
|
return FAIL; // overflow
|
||||||
}
|
}
|
||||||
|
|
||||||
// bail out if the hashtab is already at the desired size
|
|
||||||
if (newsize == ht->ht_mask + 1)
|
|
||||||
return OK;
|
|
||||||
|
|
||||||
if (newsize == HT_INIT_SIZE)
|
if (newsize == HT_INIT_SIZE)
|
||||||
{
|
{
|
||||||
// Use the small array inside the hashdict structure.
|
// Use the small array inside the hashdict structure.
|
||||||
@@ -425,6 +421,13 @@ hash_may_resize(
|
|||||||
oldarray = ht->ht_array;
|
oldarray = ht->ht_array;
|
||||||
CLEAR_FIELD(ht->ht_smallarray);
|
CLEAR_FIELD(ht->ht_smallarray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if (newsize == ht->ht_mask + 1)
|
||||||
|
{
|
||||||
|
// the hashtab is already at the desired size, bail out
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Allocate an array.
|
// Allocate an array.
|
||||||
|
@@ -695,6 +695,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1097,
|
||||||
/**/
|
/**/
|
||||||
1096,
|
1096,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user