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:
Richard Frith-Macdonald 2004-01-13 10:02:34 +00:00
parent 89c41e2f32
commit 8971343f45
2 changed files with 3 additions and 2 deletions

View file

@ -2,7 +2,8 @@
* Source/NSURLHandle.m: ([-availableResourceData]) remove condition
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>

View file

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