mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
fixups for libobjc2
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29753 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f366d9d303
commit
7ff4d4c9c7
67 changed files with 328 additions and 253 deletions
|
@ -555,7 +555,7 @@ NSAllocateObject(Class aClass, NSUInteger extraBytes, NSZone *zone)
|
|||
|
||||
NSCAssert((CLS_ISCLASS(aClass)), @"Bad class for new object");
|
||||
gc_type = (GC_descr)aClass->gc_object_type;
|
||||
size = aClass->instance_size + extraBytes;
|
||||
size = class_getInstanceSize(aClass) + extraBytes;
|
||||
if (size % sizeof(void*) != 0)
|
||||
{
|
||||
/* Size must be a multiple of pointer size for the garbage collector
|
||||
|
@ -613,7 +613,7 @@ NSAllocateObject (Class aClass, NSUInteger extraBytes, NSZone *zone)
|
|||
int size;
|
||||
|
||||
NSCAssert((CLS_ISCLASS(aClass)), @"Bad class for new object");
|
||||
size = aClass->instance_size + extraBytes + sizeof(struct obj_layout);
|
||||
size = class_getInstanceSize(aClass) + extraBytes + sizeof(struct obj_layout);
|
||||
if (zone == 0)
|
||||
{
|
||||
zone = NSDefaultMallocZone();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue