mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
fix missing check to see whether we have already initialised
This commit is contained in:
parent
958449e90f
commit
edc771775f
1 changed files with 13 additions and 10 deletions
|
@ -160,16 +160,19 @@ static char * xml_strdup(const char *from)
|
|||
@implementation NSObject (SetupForGSXML)
|
||||
+ (void) _setupForGSXML
|
||||
{
|
||||
xmlInitParser();
|
||||
xmlMemSetup(free, malloc, realloc, xml_strdup);
|
||||
xmlInitializeCatalog();
|
||||
xmlDefaultSAXHandlerInit();
|
||||
NSString_class = [NSString class];
|
||||
usSel = @selector(stringWithUTF8String:);
|
||||
usImp = (id (*)(id, SEL, const unsigned char*))
|
||||
[NSString_class methodForSelector: usSel];
|
||||
treeClass = [GSTreeSAXHandler class];
|
||||
cacheDone = YES;
|
||||
if (NO == cacheDone)
|
||||
{
|
||||
xmlInitParser();
|
||||
xmlMemSetup(free, malloc, realloc, xml_strdup);
|
||||
xmlInitializeCatalog();
|
||||
xmlDefaultSAXHandlerInit();
|
||||
NSString_class = [NSString class];
|
||||
usSel = @selector(stringWithUTF8String:);
|
||||
usImp = (id (*)(id, SEL, const unsigned char*))
|
||||
[NSString_class methodForSelector: usSel];
|
||||
treeClass = [GSTreeSAXHandler class];
|
||||
cacheDone = YES;
|
||||
}
|
||||
}
|
||||
@end
|
||||
|
||||
|
|
Loading…
Reference in a new issue