Fix to make value pointed to by mutationsPtr be unsigned long.

This commit is contained in:
Richard Frith-Macdonald 2020-12-04 11:08:16 -05:00
parent 897e5fc7dd
commit 09e527c0fd
7 changed files with 11 additions and 11 deletions

View file

@ -61,7 +61,7 @@
{
@public
GSIMapTable_t map;
NSUInteger _version;
unsigned long _version;
}
@end
@ -462,7 +462,7 @@ static SEL objSel;
objects: (__unsafe_unretained id[])stackbuf
count: (NSUInteger)len
{
state->mutationsPtr = (unsigned long *)&_version;
state->mutationsPtr = &_version;
return GSIMapCountByEnumeratingWithStateObjectsCount
(&map, state, stackbuf, len);
}

View file

@ -43,7 +43,7 @@
@public
GSIMapTable_t map;
@private
NSUInteger _version;
unsigned longd _version;
}
@end
@ -380,7 +380,7 @@
objects: (id*)stackbuf
count: (NSUInteger)len
{
state->mutationsPtr = (unsigned long *)&_version;
state->mutationsPtr = &_version;
return GSIMapCountByEnumeratingWithStateObjectsCount
(&map, state, stackbuf, len);
}

View file

@ -60,7 +60,7 @@
{
@public
GSIMapTable_t map;
NSUInteger _version;
unsigned long _version;
}
@end
@ -485,7 +485,7 @@ static SEL objSel;
objects: (__unsafe_unretained id[])stackbuf
count: (NSUInteger)len
{
state->mutationsPtr = (unsigned long *)&_version;
state->mutationsPtr = &_version;
return GSIMapCountByEnumeratingWithStateObjectsCount
(&map, state, stackbuf, len);
}

View file

@ -55,7 +55,7 @@ static SEL privateCountOfSel;
@public
GSIMapTable_t map;
@private
NSUInteger _version;
unsigned long _version;
}
@end
@ -806,7 +806,7 @@ static Class mutableSetClass;
objects: (id*)stackbuf
count: (NSUInteger)len
{
state->mutationsPtr = (unsigned long *)&_version;
state->mutationsPtr = &_version;
return GSIMapCountByEnumeratingWithStateObjectsCount
(&map, state, stackbuf, len);
}

View file

@ -918,7 +918,7 @@ const NSHashTableCallBacks NSPointerToStructHashCallBacks =
objects: (id*)stackbuf
count: (NSUInteger)len
{
state->mutationsPtr = (unsigned long *)&version;
state->mutationsPtr = &version;
return GSIMapCountByEnumeratingWithStateObjectsCount
(self, state, stackbuf, len);
}

View file

@ -1206,7 +1206,7 @@ const NSMapTableValueCallBacks NSOwnedPointerMapValueCallBacks =
objects: (id*)stackbuf
count: (NSUInteger)len
{
state->mutationsPtr = (unsigned long *)&version;
state->mutationsPtr = &version;
return GSIMapCountByEnumeratingWithStateObjectsCount
(self, state, stackbuf, len);
}

View file

@ -1398,7 +1398,7 @@ scalarSize(char type)
return;
case 4:
*(int32_t*)address = (int32_t)big;
if (big > 2147483647 || big + 2147483648 < 0)
if (big > 2147483647 || big < -2147483648LL)
{
NSLog(@"Lost information converting decoded value to int32_t");
}