diff --git a/ChangeLog b/ChangeLog index e74876586..154105594 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2016-06-19 Richard Frith-Macdonald + + * Source/cifframe.m: Use sizeof(NSInteger) as the buffer size for + small scalars if we are on an LP64 machine. + * Source/NSOperation.m: Retain operation while taking it from queue, + releasing after it is finished. Prevent crash if the original owner + of the operation releases it while it's in the queue. + 2016-06-17 Richard Frith-Macdonald * Source/GSHTTPURLHandle.m: diff --git a/Source/cifframe.m b/Source/cifframe.m index 7018fa75a..5b74185dd 100644 --- a/Source/cifframe.m +++ b/Source/cifframe.m @@ -45,10 +45,16 @@ #import "GSInvocation.h" #import "GSPrivate.h" +/* For each architecture, we need to know the native word size to + * which smaller integral types are promoted when they are passed + * as function arguments or return type. + */ #if defined(ALPHA) || (defined(MIPS) && (_MIPS_SIM == _ABIN32)) typedef long long smallret_t; #elif defined(__sparc) typedef NSInteger smallret_t; +#elif defined(__LP64__) +typedef NSInteger smallret_t; #else typedef int smallret_t; #endif