discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSBundle Fix


From: Andreas Höschler
Subject: NSBundle Fix
Date: Thu, 28 Sep 2006 19:20:55 +0200

Hello all,

please do the following modification to the tree:

NSBundle
Somebody worked on this in a sleepy mode. Replace numClasses with numBufClasses at the marked locations.

{
int i, numBufClasses = 10, numClasses = 0;
Class *classes;

classes = objc_malloc(sizeof(Class) * numBufClasses);

while ((class = objc_next_class(&state)))
{
unsigned int len = strlen (class->name);


if (len > 12 * sizeof(char) && !strncmp("NSFramework_", class->name, 12))
{
classes[numClasses++] = class;
}

if (numClasses == numBufClasses)
{
Class *ptr;

numBufClasses += 10; // <----
ptr = objc_realloc(classes, sizeof(Class) * numBufClasses); // <----

if (!ptr)
break;

classes = ptr;
}
}

for (i = 0; i < numClasses; i++)
{
[self _addFrameworkFromClass: classes[i]];
}
objc_free(classes);
}

Regards,

Andreas

reply via email to

[Prev in Thread] Current Thread [Next in Thread]