mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
Don't include <gnustep/base/String.h>.
([NSString +initialize]): Don't use static variable to prevent getting run twice. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1942 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
392219f73c
commit
74a42c0111
1 changed files with 8 additions and 11 deletions
|
@ -43,7 +43,6 @@
|
|||
#include <Foundation/NSDictionary.h>
|
||||
#include <gnustep/base/IndexedCollection.h>
|
||||
#include <gnustep/base/IndexedCollectionPrivate.h>
|
||||
#include <gnustep/base/String.h>
|
||||
#include <gnustep/base/behavior.h>
|
||||
#include <limits.h>
|
||||
#include <string.h> // for strstr()
|
||||
|
@ -167,11 +166,8 @@ handle_printf_atsign (FILE *stream,
|
|||
|
||||
+ (void) initialize
|
||||
{
|
||||
static int done = 0;
|
||||
if (!done)
|
||||
if (self == [NSString class])
|
||||
{
|
||||
done = 1;
|
||||
class_add_behavior([NSString class], [String class]);
|
||||
NSString_concrete_class = [NSGCString class];
|
||||
NSString_c_concrete_class = [NSGCString class];
|
||||
NSMutableString_concrete_class = [NSGMutableCString class];
|
||||
|
@ -305,7 +301,8 @@ handle_printf_atsign (FILE *stream,
|
|||
OBJC_MALLOC (s, char, buf.st_size + 1);
|
||||
fd = open ([path cString], O_RDONLY);
|
||||
if ( fd < 0 )
|
||||
[NSException raise: NSGenericException format: @"Could not open file %s", [path cString]];
|
||||
[NSException raise: NSGenericException
|
||||
format: @"Could not open file %s", [path cString]];
|
||||
|
||||
read (fd,(void *)s,buf.st_size);
|
||||
s[buf.st_size] = (char)0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue