mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
iImproved comments
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@13140 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d1f2f1254b
commit
10dd3bd613
1 changed files with 19 additions and 16 deletions
|
@ -663,8 +663,8 @@ cString_c(ivars self)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The external C string encoding is not compatible with the internal
|
* The external C string encoding is not compatible with the internal
|
||||||
* C strings ... we must convert from internal format to unicode and
|
* 8-bit character strings ... we must convert from internal format to
|
||||||
* then to the external C string encoding.
|
* unicode and then to the external C string encoding.
|
||||||
*/
|
*/
|
||||||
if (GSToUnicode(&u, &l, self->_contents.c, self->_count, intEnc,
|
if (GSToUnicode(&u, &l, self->_contents.c, self->_count, intEnc,
|
||||||
NSDefaultMallocZone(), 0) == NO)
|
NSDefaultMallocZone(), 0) == NO)
|
||||||
|
@ -720,8 +720,8 @@ cStringLength_c(ivars self)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* The external C string encoding is not compatible with the internal
|
* The external C string encoding is not compatible with the internal
|
||||||
* C strings ... we must convert from internal format to unicode and
|
* 8-bit character strings ... we must convert from internal format to
|
||||||
* then to the external C string encoding.
|
* unicode and then to the external C string encoding.
|
||||||
*/
|
*/
|
||||||
if (self->_count == 0)
|
if (self->_count == 0)
|
||||||
{
|
{
|
||||||
|
@ -1576,17 +1576,18 @@ transmute(ivars self, NSString *aString)
|
||||||
|| (c == GSMutableStringClass && other->_flags.wide == 0))
|
|| (c == GSMutableStringClass && other->_flags.wide == 0))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* This is a C string, but the other string is also a C string
|
* This is an 8-bit character string, but the other string is also
|
||||||
* so we don't need to transmute, and we can use its ivars.
|
* an 8-bit character string, so we don't need to transmute, and
|
||||||
|
* we can use its ivars.
|
||||||
*/
|
*/
|
||||||
transmute = NO;
|
transmute = NO;
|
||||||
}
|
}
|
||||||
else if ([aString canBeConvertedToEncoding: intEnc] == YES)
|
else if ([aString canBeConvertedToEncoding: intEnc] == YES)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* This is a C string, but the other string can be converted to
|
* This is an 8-bit character string, but the other string can be
|
||||||
* a C string, so we don't need to transmute, but we can not use
|
* converted to an 8-bit character string, so we don't need to
|
||||||
* its ivars.
|
* transmute, but we can *not* use its ivars.
|
||||||
*/
|
*/
|
||||||
transmute = NO;
|
transmute = NO;
|
||||||
other = 0;
|
other = 0;
|
||||||
|
@ -1595,18 +1596,19 @@ transmute(ivars self, NSString *aString)
|
||||||
|| GSObjCIsKindOf(c, GSUnicodeStringClass) == YES)
|
|| GSObjCIsKindOf(c, GSUnicodeStringClass) == YES)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* This is a C string, and the other string can not be converted
|
* This is an 8-bit character string, and the other string can
|
||||||
* to a C string, so we need to transmute, and will then be able
|
* not be converted to an 8-bit character string, so we need to
|
||||||
* to use its ivars.
|
* transmute, and will then be able to use its ivars.
|
||||||
*/
|
*/
|
||||||
transmute = YES;
|
transmute = YES;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* This is a C string, and the other string can not be converted
|
* This is an 8-bit character string, and the other string can
|
||||||
* to a C string, so we need to transmute, but even then we will
|
* not be converted to an 8-bit character string, so we need to
|
||||||
* not be able to use the other strings ivars.
|
* transmute, but even then we will not be able to use the other
|
||||||
|
* strings ivars.
|
||||||
*/
|
*/
|
||||||
other = 0;
|
other = 0;
|
||||||
}
|
}
|
||||||
|
@ -2380,7 +2382,8 @@ transmute(ivars self, NSString *aString)
|
||||||
t = (NSString*)[NSStringClass allocWithZone: NSDefaultMallocZone()];
|
t = (NSString*)[NSStringClass allocWithZone: NSDefaultMallocZone()];
|
||||||
/*
|
/*
|
||||||
* Now initialise with the format information ... the placeholder
|
* Now initialise with the format information ... the placeholder
|
||||||
* can decide whether to create a concrete C string or unicode string.
|
* can decide whether to create a concrete 8-bit character string
|
||||||
|
* or unicode string.
|
||||||
*/
|
*/
|
||||||
t = [t initWithFormat: format arguments: ap];
|
t = [t initWithFormat: format arguments: ap];
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue