Little tweak for safety .. return immutable copy rather than mutable

instance variable.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@18404 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2004-01-13 10:02:34 +00:00
parent 52fd51a940
commit c1d4c8962a
2 changed files with 3 additions and 2 deletions

View file

@ -2,7 +2,8 @@
* Source/NSURLHandle.m: ([-availableResourceData]) remove condition * Source/NSURLHandle.m: ([-availableResourceData]) remove condition
that returns nil while resource is loading. Fix typo in method that returns nil while resource is loading. Fix typo in method
description. description. Return copy a of internal variable rather than the
actuyal mutable data object.
2004-01-12 Adam Fedor <fedor@gnu.org> 2004-01-12 Adam Fedor <fedor@gnu.org>

View file

@ -247,7 +247,7 @@ static Class NSURLHandleClass = 0;
*/ */
- (NSData*) availableResourceData - (NSData*) availableResourceData
{ {
return _data; return AUTORELEASE([_data copy]);
} }
/** /**