mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-26 10:11:03 +00:00
([Storage -initCount:elementSize:description:]): In accordance with
Objective C runtime change, use objc_malloc as a function, not a function pointer. ([Storage -shallowCopy]): Likewise. ([Storage -read:]): Likewise. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1722 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
06dc514aa1
commit
c6071d8497
1 changed files with 2 additions and 2 deletions
|
@ -104,7 +104,7 @@ typedef struct {
|
|||
- shallowCopy
|
||||
{
|
||||
Storage *c = [super shallowCopy];
|
||||
c->dataPtr = (void*) (*objc_malloc)(maxElements * elementSize);
|
||||
c->dataPtr = (void*) objc_malloc (maxElements * elementSize);
|
||||
memcpy(c->dataPtr, dataPtr, numElements * elementSize);
|
||||
return c;
|
||||
}
|
||||
|
@ -281,7 +281,7 @@ static inline void _shrinkIfDesired(Storage *self)
|
|||
[super read:aStream];
|
||||
objc_read_types(aStream, "III*",
|
||||
&numElements, &maxElements, &elementSize, &description);
|
||||
dataPtr = (void*) (*objc_malloc)(maxElements * elementSize);
|
||||
dataPtr = (void*) objc_malloc (maxElements * elementSize);
|
||||
for (i = 0; i < numElements; i++)
|
||||
objc_read_type(aStream, description, STORAGE_NTH(i));
|
||||
return self;
|
||||
|
|
Loading…
Reference in a new issue