Added patch from nicola

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@8318 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 2000-12-13 14:38:55 +00:00
parent 29d2f5690b
commit 38e2332a79
3 changed files with 39 additions and 20 deletions

View file

@ -40,22 +40,6 @@ setupCache()
}
}
NSRange
NSMakeRange(unsigned int location, unsigned int length)
{
NSRange range;
unsigned int end = location + length;
if (end < location || end < length)
{
[NSException raise: NSRangeException
format: @"Range location + length too great"];
}
range.location = location;
range.length = length;
return range;
}
NSRange
NSRangeFromString(NSString* string)
{
@ -86,3 +70,8 @@ NSStringFromRange(NSRange range)
range.location, range.length];
}
void _NSRangeExceptionRaise ()
{
[NSException raise: NSRangeException
format: @"Range location + length too great"];
}