declare external block as const void rather than void for consistency and to avoid compiler warning

This commit is contained in:
Richard Frith-Macdonald 2020-12-04 04:36:42 -05:00
parent aeca9c8698
commit 190bafad72

View file

@ -209,7 +209,7 @@ _Block_copy(const void *src)
{
struct StackBlockClass *self = (struct StackBlockClass *)src;
struct StackBlockClass *ret = self;
extern void _NSConcreteStackBlock;
extern const void _NSConcreteStackBlock;
// If the block is Global, there's no need to copy it on the heap.
if (self->isa == &_NSConcreteStackBlock
@ -233,7 +233,7 @@ void
_Block_release(const void *src)
{
struct StackBlockClass *self = (struct StackBlockClass *)src;
extern void _NSConcreteStackBlock;
extern const void _NSConcreteStackBlock;
if (self->isa == &_NSConcreteStackBlock
// A Global block doesn't need to be released