49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
if ((methods = malloc((count + 1) * sizeof(Method))) == NULL)
OBJC_ERROR("Not enough memory to copy methods");
i = 0;
for (iter = class->methodList; iter != NULL; iter = iter->next)
for (unsigned int j = 0; j < iter->count; j++)
methods[i++] = &iter->methods[j];
OFEnsure(i == count);
methods[count] = NULL;
if (outCount != NULL)
*outCount = count;
objc_globalMutex_unlock();
|
>
|
>
>
|
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
if ((methods = malloc((count + 1) * sizeof(Method))) == NULL)
OBJC_ERROR("Not enough memory to copy methods");
i = 0;
for (iter = class->methodList; iter != NULL; iter = iter->next)
for (unsigned int j = 0; j < iter->count; j++)
methods[i++] = &iter->methods[j];
if (i != count)
OBJC_ERROR("Fatal internal inconsistency!");
methods[count] = NULL;
if (outCount != NULL)
*outCount = count;
objc_globalMutex_unlock();
|