mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Improve detection of double inits
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@10281 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
55459b00d7
commit
8c8afa6b29
2 changed files with 16 additions and 7 deletions
|
@ -1,3 +1,8 @@
|
|||
2001-07-02 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSString.m: Never init nocopy with null pointer - increase
|
||||
chance of double initialisation being detected.
|
||||
|
||||
2001-06-27 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/callframe.m: callframe_do_call_opts(),
|
||||
|
|
|
@ -586,7 +586,9 @@ handle_printf_atsign (FILE *stream,
|
|||
}
|
||||
else
|
||||
{
|
||||
self = [self initWithCharactersNoCopy: 0 length: 0 freeWhenDone: NO];
|
||||
self = [self initWithCharactersNoCopy: (unichar*)""
|
||||
length: 0
|
||||
freeWhenDone: NO];
|
||||
}
|
||||
|
||||
return self;
|
||||
|
@ -649,7 +651,7 @@ handle_printf_atsign (FILE *stream,
|
|||
}
|
||||
else
|
||||
{
|
||||
self = [self initWithCharactersNoCopy: 0
|
||||
self = [self initWithCharactersNoCopy: (unichar*)""
|
||||
length: 0
|
||||
freeWhenDone: NO];
|
||||
}
|
||||
|
@ -700,7 +702,7 @@ handle_printf_atsign (FILE *stream,
|
|||
}
|
||||
else
|
||||
{
|
||||
self = [self initWithCharactersNoCopy: 0
|
||||
self = [self initWithCharactersNoCopy: (unichar*)""
|
||||
length: 0
|
||||
freeWhenDone: NO];
|
||||
}
|
||||
|
@ -1065,7 +1067,7 @@ handle_printf_atsign (FILE *stream,
|
|||
}
|
||||
else
|
||||
{
|
||||
self = [self initWithCStringNoCopy: 0 length: 0 freeWhenDone: NO];
|
||||
self = [self initWithCStringNoCopy: "" length: 0 freeWhenDone: NO];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
@ -1109,7 +1111,7 @@ handle_printf_atsign (FILE *stream,
|
|||
|
||||
if (len < 1 || (len < 2 && encoding == NSUnicodeStringEncoding))
|
||||
{
|
||||
return [self initWithCStringNoCopy: 0 length: 0 freeWhenDone: NO];
|
||||
return [self initWithCStringNoCopy: "" length: 0 freeWhenDone: NO];
|
||||
}
|
||||
|
||||
b = [data bytes];
|
||||
|
@ -1197,7 +1199,9 @@ handle_printf_atsign (FILE *stream,
|
|||
|
||||
- (id) init
|
||||
{
|
||||
self = [self initWithCharactersNoCopy: 0 length: 0 freeWhenDone: 0];
|
||||
self = [self initWithCharactersNoCopy: (unichar*)""
|
||||
length: 0
|
||||
freeWhenDone: 0];
|
||||
return self;
|
||||
}
|
||||
|
||||
|
@ -3380,7 +3384,7 @@ handle_printf_atsign (FILE *stream,
|
|||
}
|
||||
else
|
||||
{
|
||||
self = [self initWithCStringNoCopy: 0 length: 0 freeWhenDone: NO];
|
||||
self = [self initWithCStringNoCopy: "" length: 0 freeWhenDone: NO];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue