Use string objects instead of C strings

for name arguments to encoding methods.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@796 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Andrew McCallum 1996-01-24 03:33:21 +00:00
parent 6593f89af7
commit 300f160311
14 changed files with 41 additions and 41 deletions

View file

@ -99,7 +99,7 @@ static BOOL debug_binary_coder = NO;
{
int length = strlen(*(char**)d);
[self encodeValueOfCType:@encode(int)
at:&length withName:"BinaryCoder char* length"];
at:&length withName:@"BinaryCoder char* length"];
[stream writeBytes:*(char**)d length:length];
break;
}
@ -173,7 +173,7 @@ static BOOL debug_binary_coder = NO;
char *s = buf;
sprintf(buf, "%f", *(float*)d);
[self encodeValueOfCType:@encode(char*)
at:&s withName:"BinaryCoder float"];
at:&s withName:@"BinaryCoder float"];
break;
}
case _C_DBL:
@ -182,7 +182,7 @@ static BOOL debug_binary_coder = NO;
char *s = buf;
sprintf(buf, "%f", *(double*)d);
[self encodeValueOfCType:@encode(char*)
at:&s withName:"BinaryCoder double"];
at:&s withName:@"BinaryCoder double"];
break;
}
default:
@ -317,7 +317,7 @@ static BOOL debug_binary_coder = NO;
[[BinaryCoder debugStderrCoder]
encodeValueOfCType:type
at:d
withName:"decoding unnamed"];
withName:@"decoding unnamed"];
}
}

View file

@ -41,9 +41,9 @@
- (void) encodeWithCoder: aCoder
{
[super encodeWithCoder:(id)aCoder];
[aCoder encodeObjectReference:_right withName:"Right BinaryTree Node"];
[aCoder encodeObjectReference:_left withName:"Left BinaryTree Node"];
[aCoder encodeObjectReference:_parent withName:"Parent BinaryTree Node"];
[aCoder encodeObjectReference:_right withName:@"Right BinaryTree Node"];
[aCoder encodeObjectReference:_left withName:@"Left BinaryTree Node"];
[aCoder encodeObjectReference:_parent withName:@"Parent BinaryTree Node"];
}
- initWithCoder: aCoder

View file

@ -1303,12 +1303,12 @@ for info about latest version.",
{
[aCoder encodeValueOfObjCType:encoding
at:elt_get_ptr_to_member(encoding, &e)
withName:"Collection element"];
withName:@"Collection element"];
}
[aCoder encodeValueOfCType:@encode(unsigned)
at:&count
withName:"Collection element count"];
withName:@"Collection element count"];
[self withElementsCall:archiveElement];
}

View file

@ -271,7 +271,7 @@ static int messagesReceivedCount;
work the way I wanted, we wouldn't need to do this. */
[op encodeValueOfCType:@encode(char*)
at:&type
withName:"selector type"];
withName:@"selector type"];
/* xxx This doesn't work with proxies and the NeXT runtime because
type may be a method_type from a remote machine with a
@ -713,7 +713,7 @@ static int messagesReceivedCount;
type = "";
[op encodeValueOfCType:@encode(char*)
at:&type
withName:"Requested Method Type for Target"];
withName:@"Requested Method Type for Target"];
[op dismiss];
return self;
}
@ -728,7 +728,7 @@ static int messagesReceivedCount;
assert(in_port);
/* Perhaps we should turn this into a class method. */
assert([rmc connection] == self);
[op encodeObject:rootObject withName:"root object"];
[op encodeObject:rootObject withName:@"root object"];
[op dismiss];
return self;
}

View file

@ -55,9 +55,9 @@
{
[anEncoder encodeValueOfCType:@encode(unsigned char)
at:&_send_behavior
withName:"DelegatePool Send Behavior"];
withName:@"DelegatePool Send Behavior"];
[anEncoder encodeObject:_list
withName:"DelegatePool Collection of Delegates"];
withName:@"DelegatePool Collection of Delegates"];
}
+ newWithCoder: aDecoder

View file

@ -97,9 +97,9 @@
[super _encodeCollectionWithCoder:aCoder];
[aCoder encodeValueOfObjCType:@encode(char*) at:&encoding
withName:"EltNodeCollector Content Type Encoding"];
withName:@"EltNodeCollector Content Type Encoding"];
[aCoder encodeValueOfObjCType:"#" at:&_node_class
withName:"EltNodeCollector Content Node Class"];
withName:@"EltNodeCollector Content Node Class"];
}
- _initCollectionWithCoder: aCoder
@ -117,7 +117,7 @@
- (void) _encodeContentsWithCoder: (Coder*)aCoder
{
[aCoder encodeObject:_contents_collector
withName:"EltNodeCollector Contents Collector"];
withName:@"EltNodeCollector Contents Collector"];
}
- (void) _decodeContentsWithCoder: (Coder*)aCoder

View file

@ -42,8 +42,8 @@
- (void) encodeWithCoder: aCoder
{
[super encodeWithCoder:aCoder];
[aCoder encodeObjectReference:_next withName:"Next LinkedList Node"];
[aCoder encodeObjectReference:_prev withName:"Prev LinkedList Node"];
[aCoder encodeObjectReference:_next withName:@"Next LinkedList Node"];
[aCoder encodeObjectReference:_prev withName:@"Prev LinkedList Node"];
}
- initWithCoder: aCoder

View file

@ -120,9 +120,9 @@ stringDecrementCountAndFillHoleAt(MutableCStringStruct *self,
- (void) encodeWithCoder: aCoder
{
[aCoder encodeValueOfObjCType:@encode(unsigned) at:&_capacity
withName:"String capacity"];
withName:@"String capacity"];
[aCoder encodeValueOfObjCType:@encode(char*) at:&_contents_chars
withName:"String content_chars"];
withName:@"String content_chars"];
}
- initWithCoder: aCoder

View file

@ -60,7 +60,7 @@
- (void) encodeWithCoder: aCoder
{
[aCoder encodeValueOfObjCType:@encode(char*) at:&_contents_chars
withName:"Concrete String content_chars"];
withName:@"Concrete String content_chars"];
}
- initWithCoder: aCoder
@ -256,9 +256,9 @@ stringDecrementCountAndFillHoleAt(NSGMutableCStringStruct *self,
- (void) encodeWithCoder: aCoder
{
[aCoder encodeValueOfObjCType:@encode(unsigned) at:&_capacity
withName:"String capacity"];
withName:@"String capacity"];
[aCoder encodeValueOfObjCType:@encode(char*) at:&_contents_chars
withName:"String content_chars"];
withName:@"String content_chars"];
}
- initWithCoder: aCoder

View file

@ -149,13 +149,13 @@ static inline BOOL class_is_kind_of(Class self, Class aClassObject)
/* This proxy is local on the other side */
willBeLocal = YES;
[aRmc encodeObjectBycopy:nil
withName:"Proxy is local on other side"];
withName:@"Proxy is local on other side"];
[aRmc encodeValueOfObjCType:@encode(unsigned)
at:&aTarget
withName:"Object Proxy target"];
withName:@"Object Proxy target"];
[aRmc encodeValueOfObjCType:@encode(BOOL)
at:&willBeLocal
withName:"Proxy willBeLocal"];
withName:@"Proxy willBeLocal"];
}
else
{
@ -167,13 +167,13 @@ static inline BOOL class_is_kind_of(Class self, Class aClassObject)
/* It's remote here, so we need to tell other side where to form
triangle connection to */
[aRmc encodeObjectBycopy:op
withName:"Proxy outPort"];
withName:@"Proxy outPort"];
[aRmc encodeValueOfObjCType:@encode(unsigned)
at:&aTarget
withName:"Object Proxy target"];
withName:@"Object Proxy target"];
[aRmc encodeValueOfObjCType:@encode(BOOL)
at:&willBeLocal
withName:"Proxy willBeLocal"];
withName:@"Proxy willBeLocal"];
}
}
else
@ -185,13 +185,13 @@ static inline BOOL class_is_kind_of(Class self, Class aClassObject)
[[aRmc connection] addLocalObject:anObject];
/* if nil port, other connection will use ConnectedCoder remotePort */
[aRmc encodeObjectBycopy:nil
withName:"Proxy outPort == remotePort"];
withName:@"Proxy outPort == remotePort"];
[aRmc encodeValueOfObjCType:@encode(unsigned)
at:&aTarget
withName:"Object Proxy target"];
withName:@"Object Proxy target"];
[aRmc encodeValueOfObjCType:@encode(BOOL)
at:&willBeLocal
withName:"Proxy willBeLocal"];
withName:@"Proxy willBeLocal"];
}
}

View file

@ -41,7 +41,7 @@
- (void) encodeWithCoder: aCoder
{
[super encodeWithCoder:aCoder];
[aCoder encodeValueOfObjCType:@encode(BOOL) at:&_red withName:"RBTreeNode isRed"];
[aCoder encodeValueOfObjCType:@encode(BOOL) at:&_red withName:@"RBTreeNode isRed"];
}
- initWithCoder: aCoder

View file

@ -68,10 +68,10 @@
[super _encodeCollectionWithCoder:aCoder];
[aCoder encodeValueOfCType:@encode(char*)
at:&enc
withName:"Set contents encoding"];
withName:@"Set contents encoding"];
[aCoder encodeValueOfCType:@encode(unsigned)
at:&(_contents_hash->size)
withName:"Set contents capacity"];
withName:@"Set contents capacity"];
return;
}

View file

@ -387,7 +387,7 @@ or
{
[aCoder encodeValueOfObjCType:@encode(typeof(sockPort.sin_port))
at:&sockPort.sin_port
withName:"socket number"];
withName:@"socket number"];
if (![self isSoft])
{
struct hostent *hp;
@ -400,13 +400,13 @@ or
bcopy(hp->h_addr, &sp.sin_addr, hp->h_length);
[aCoder encodeValueOfObjCType:@encode(typeof(sp.sin_addr.s_addr))
at:&sp.sin_addr.s_addr
withName:"inet address"];
withName:@"inet address"];
}
else
{
[aCoder encodeValueOfObjCType:@encode(typeof(sockPort.sin_addr.s_addr))
at:&sockPort.sin_addr.s_addr
withName:"inet address"];
withName:@"inet address"];
}
}

View file

@ -55,8 +55,8 @@
- (void) encodeWithCoder: aCoder
{
[super encodeWithCoder:aCoder];
[aCoder encodeObjectReference:_parent withName:"Parent Tree Node"];
[aCoder encodeObject:_children withName:"Children of Tree Node"];
[aCoder encodeObjectReference:_parent withName:@"Parent Tree Node"];
[aCoder encodeObject:_children withName:@"Children of Tree Node"];
}
- initWithCoder: aCoder