mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
* Source/NSCharacterSet.m
([NSCharacterSet _bitmapForSet:number:]): Insure only instances of NSCharacterSet a stored in the cache but return instances of the receivers class. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@18014 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
dfef5c3ecb
commit
b5dd8fa367
2 changed files with 23 additions and 3 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2003-10-31 David Ayers <d.ayers@inode.at>
|
||||||
|
|
||||||
|
* Source/NSCharacterSet.m
|
||||||
|
([NSCharacterSet _bitmapForSet:number:]): Insure only instances of
|
||||||
|
NSCharacterSet a stored in the cache but return instances of the
|
||||||
|
receivers class.
|
||||||
|
|
||||||
2003-10-30 David Ayers <d.ayers@inode.at>
|
2003-10-30 David Ayers <d.ayers@inode.at>
|
||||||
|
|
||||||
* Headers/Additions/GNUstepBase/GSLock.h: Added missing forward
|
* Headers/Additions/GNUstepBase/GSLock.h: Added missing forward
|
||||||
|
|
|
@ -113,9 +113,14 @@ static NSLock* cache_lock = nil;
|
||||||
if (set_path != nil)
|
if (set_path != nil)
|
||||||
{
|
{
|
||||||
NS_DURING
|
NS_DURING
|
||||||
/* Load the character set file */
|
{
|
||||||
set = [self characterSetWithBitmapRepresentation:
|
NSData *data;
|
||||||
[NSData dataWithContentsOfFile: set_path]];
|
|
||||||
|
/* Load the character set file */
|
||||||
|
data = [NSData dataWithContentsOfFile: set_path];
|
||||||
|
set = [NSCharacterSet characterSetWithBitmapRepresentation:
|
||||||
|
data];
|
||||||
|
}
|
||||||
NS_HANDLER
|
NS_HANDLER
|
||||||
NSLog(@"Unable to read NSCharacterSet file %@", set_path);
|
NSLog(@"Unable to read NSCharacterSet file %@", set_path);
|
||||||
set = nil;
|
set = nil;
|
||||||
|
@ -145,6 +150,14 @@ static NSLock* cache_lock = nil;
|
||||||
set = cache_set[number];
|
set = cache_set[number];
|
||||||
|
|
||||||
[cache_lock unlock];
|
[cache_lock unlock];
|
||||||
|
|
||||||
|
if ([self isSubclassOfClass: [NSCharacterSet class]])
|
||||||
|
{
|
||||||
|
NSData *data;
|
||||||
|
data = [set bitmapRepresentation];
|
||||||
|
set = [self characterSetWithBitmapRepresentation: data];
|
||||||
|
}
|
||||||
|
|
||||||
return set;
|
return set;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue