mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-04 02:20:48 +00:00
Set zone when reading from file
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28451 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
033abe232d
commit
3cc2adbd35
1 changed files with 2 additions and 1 deletions
|
@ -3256,7 +3256,7 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
|
||||||
#if GS_WITH_GC
|
#if GS_WITH_GC
|
||||||
owned = shouldFree; // Free memory on finalisation.
|
owned = shouldFree; // Free memory on finalisation.
|
||||||
#else
|
#else
|
||||||
if (shouldFree == NO || aBuffer == 0)
|
if (shouldFree == NO)
|
||||||
{
|
{
|
||||||
zone = 0; // Don't free this memory.
|
zone = 0; // Don't free this memory.
|
||||||
}
|
}
|
||||||
|
@ -3335,6 +3335,7 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
zone = GSObjCZone(self);
|
||||||
if (readContentsOfFile(path, &bytes, &length, zone) == NO)
|
if (readContentsOfFile(path, &bytes, &length, zone) == NO)
|
||||||
{
|
{
|
||||||
[self release];
|
[self release];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue