mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Use new-style method name "..ValueOfObjCType"
and "..ValueOfCType", instead of "..ValueOfType" and "..ValueOfSimpleType". git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@781 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
97ceb69629
commit
e8e57eaff3
19 changed files with 90 additions and 90 deletions
|
@ -67,13 +67,13 @@
|
||||||
const char *encoding = [self contentType];
|
const char *encoding = [self contentType];
|
||||||
|
|
||||||
[super _encodeCollectionWithCoder:coder];
|
[super _encodeCollectionWithCoder:coder];
|
||||||
[coder encodeValueOfSimpleType:@encode(char*)
|
[coder encodeValueOfCType:@encode(char*)
|
||||||
at:&encoding
|
at:&encoding
|
||||||
withName:"Array Encoding Type"];
|
withName:"Array Encoding Type"];
|
||||||
[coder encodeValueOfSimpleType:@encode(unsigned)
|
[coder encodeValueOfCType:@encode(unsigned)
|
||||||
at:&_grow_factor
|
at:&_grow_factor
|
||||||
withName:"Array Grow Factor"];
|
withName:"Array Grow Factor"];
|
||||||
[coder encodeValueOfSimpleType:@encode(unsigned)
|
[coder encodeValueOfCType:@encode(unsigned)
|
||||||
at:&_capacity
|
at:&_capacity
|
||||||
withName:"Array Capacity"];
|
withName:"Array Capacity"];
|
||||||
}
|
}
|
||||||
|
@ -82,15 +82,15 @@
|
||||||
{
|
{
|
||||||
char *encoding;
|
char *encoding;
|
||||||
[super _initCollectionWithCoder:coder];
|
[super _initCollectionWithCoder:coder];
|
||||||
[coder decodeValueOfSimpleType:@encode(char*)
|
[coder decodeValueOfCType:@encode(char*)
|
||||||
at:&encoding
|
at:&encoding
|
||||||
withName:NULL];
|
withName:NULL];
|
||||||
_comparison_function = elt_get_comparison_function(encoding);
|
_comparison_function = elt_get_comparison_function(encoding);
|
||||||
[coder decodeValueOfSimpleType:@encode(unsigned)
|
[coder decodeValueOfCType:@encode(unsigned)
|
||||||
at:&_grow_factor
|
at:&_grow_factor
|
||||||
withName:NULL];
|
withName:NULL];
|
||||||
_count = 0;
|
_count = 0;
|
||||||
[coder decodeValueOfSimpleType:@encode(unsigned)
|
[coder decodeValueOfCType:@encode(unsigned)
|
||||||
at:&_capacity
|
at:&_capacity
|
||||||
withName:NULL];
|
withName:NULL];
|
||||||
OBJC_MALLOC(_contents_array, elt, _capacity);
|
OBJC_MALLOC(_contents_array, elt, _capacity);
|
||||||
|
|
|
@ -66,7 +66,7 @@ static BOOL debug_binary_coder = NO;
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) encodeValueOfSimpleType: (const char*)type
|
- (void) encodeValueOfCType: (const char*)type
|
||||||
at: (const void*)d
|
at: (const void*)d
|
||||||
withName: (const char *)name
|
withName: (const char *)name
|
||||||
{
|
{
|
||||||
|
@ -75,7 +75,7 @@ static BOOL debug_binary_coder = NO;
|
||||||
if (debug_binary_coder)
|
if (debug_binary_coder)
|
||||||
{
|
{
|
||||||
[[BinaryCoder debugStderrCoder]
|
[[BinaryCoder debugStderrCoder]
|
||||||
encodeValueOfSimpleType:type
|
encodeValueOfCType:type
|
||||||
at:d
|
at:d
|
||||||
withName:name];
|
withName:name];
|
||||||
}
|
}
|
||||||
|
@ -98,7 +98,7 @@ static BOOL debug_binary_coder = NO;
|
||||||
case _C_CHARPTR:
|
case _C_CHARPTR:
|
||||||
{
|
{
|
||||||
int length = strlen(*(char**)d);
|
int length = strlen(*(char**)d);
|
||||||
[self encodeValueOfSimpleType:@encode(int)
|
[self encodeValueOfCType:@encode(int)
|
||||||
at:&length withName:"BinaryCoder char* length"];
|
at:&length withName:"BinaryCoder char* length"];
|
||||||
[stream writeBytes:*(char**)d length:length];
|
[stream writeBytes:*(char**)d length:length];
|
||||||
break;
|
break;
|
||||||
|
@ -172,7 +172,7 @@ static BOOL debug_binary_coder = NO;
|
||||||
char buf[64];
|
char buf[64];
|
||||||
char *s = buf;
|
char *s = buf;
|
||||||
sprintf(buf, "%f", *(float*)d);
|
sprintf(buf, "%f", *(float*)d);
|
||||||
[self encodeValueOfSimpleType:@encode(char*)
|
[self encodeValueOfCType:@encode(char*)
|
||||||
at:&s withName:"BinaryCoder float"];
|
at:&s withName:"BinaryCoder float"];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -181,7 +181,7 @@ static BOOL debug_binary_coder = NO;
|
||||||
char buf[64];
|
char buf[64];
|
||||||
char *s = buf;
|
char *s = buf;
|
||||||
sprintf(buf, "%f", *(double*)d);
|
sprintf(buf, "%f", *(double*)d);
|
||||||
[self encodeValueOfSimpleType:@encode(char*)
|
[self encodeValueOfCType:@encode(char*)
|
||||||
at:&s withName:"BinaryCoder double"];
|
at:&s withName:"BinaryCoder double"];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -190,7 +190,7 @@ static BOOL debug_binary_coder = NO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) decodeValueOfSimpleType: (const char*)type
|
- (void) decodeValueOfCType: (const char*)type
|
||||||
at: (void*)d
|
at: (void*)d
|
||||||
withName: (const char **)namePtr
|
withName: (const char **)namePtr
|
||||||
{
|
{
|
||||||
|
@ -216,7 +216,7 @@ static BOOL debug_binary_coder = NO;
|
||||||
case _C_CHARPTR:
|
case _C_CHARPTR:
|
||||||
{
|
{
|
||||||
int length;
|
int length;
|
||||||
[self decodeValueOfSimpleType:@encode(int)
|
[self decodeValueOfCType:@encode(int)
|
||||||
at:&length withName:NULL];
|
at:&length withName:NULL];
|
||||||
OBJC_MALLOC(*(char**)d, char, length+1);
|
OBJC_MALLOC(*(char**)d, char, length+1);
|
||||||
[stream readBytes:*(char**)d length:length];
|
[stream readBytes:*(char**)d length:length];
|
||||||
|
@ -293,7 +293,7 @@ static BOOL debug_binary_coder = NO;
|
||||||
case _C_FLT:
|
case _C_FLT:
|
||||||
{
|
{
|
||||||
char *buf;
|
char *buf;
|
||||||
[self decodeValueOfSimpleType:@encode(char*) at:&buf withName:NULL];
|
[self decodeValueOfCType:@encode(char*) at:&buf withName:NULL];
|
||||||
if (sscanf(buf, "%f", (float*)d) != 1)
|
if (sscanf(buf, "%f", (float*)d) != 1)
|
||||||
[self error:"expected float, got %s", buf];
|
[self error:"expected float, got %s", buf];
|
||||||
(*objc_free)(buf);
|
(*objc_free)(buf);
|
||||||
|
@ -302,7 +302,7 @@ static BOOL debug_binary_coder = NO;
|
||||||
case _C_DBL:
|
case _C_DBL:
|
||||||
{
|
{
|
||||||
char *buf;
|
char *buf;
|
||||||
[self decodeValueOfSimpleType:@encode(char*) at:&buf withName:NULL];
|
[self decodeValueOfCType:@encode(char*) at:&buf withName:NULL];
|
||||||
if (sscanf(buf, "%lf", (double*)d) != 1)
|
if (sscanf(buf, "%lf", (double*)d) != 1)
|
||||||
[self error:"expected double, got %s", buf];
|
[self error:"expected double, got %s", buf];
|
||||||
(*objc_free)(buf);
|
(*objc_free)(buf);
|
||||||
|
@ -315,7 +315,7 @@ static BOOL debug_binary_coder = NO;
|
||||||
if (debug_binary_coder)
|
if (debug_binary_coder)
|
||||||
{
|
{
|
||||||
[[BinaryCoder debugStderrCoder]
|
[[BinaryCoder debugStderrCoder]
|
||||||
encodeValueOfSimpleType:type
|
encodeValueOfCType:type
|
||||||
at:d
|
at:d
|
||||||
withName:"decoding unnamed"];
|
withName:"decoding unnamed"];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1301,12 +1301,12 @@ for info about latest version.",
|
||||||
const char *encoding = [self contentType];
|
const char *encoding = [self contentType];
|
||||||
void archiveElement(elt e)
|
void archiveElement(elt e)
|
||||||
{
|
{
|
||||||
[aCoder encodeValueOfType:encoding
|
[aCoder encodeValueOfObjCType:encoding
|
||||||
at:elt_get_ptr_to_member(encoding, &e)
|
at:elt_get_ptr_to_member(encoding, &e)
|
||||||
withName:"Collection element"];
|
withName:"Collection element"];
|
||||||
}
|
}
|
||||||
|
|
||||||
[aCoder encodeValueOfSimpleType:@encode(unsigned)
|
[aCoder encodeValueOfCType:@encode(unsigned)
|
||||||
at:&count
|
at:&count
|
||||||
withName:"Collection element count"];
|
withName:"Collection element count"];
|
||||||
[self withElementsCall:archiveElement];
|
[self withElementsCall:archiveElement];
|
||||||
|
@ -1318,12 +1318,12 @@ for info about latest version.",
|
||||||
elt newElement;
|
elt newElement;
|
||||||
const char *encoding = [self contentType];
|
const char *encoding = [self contentType];
|
||||||
|
|
||||||
[aCoder decodeValueOfSimpleType:@encode(unsigned)
|
[aCoder decodeValueOfCType:@encode(unsigned)
|
||||||
at:&count
|
at:&count
|
||||||
withName:NULL];
|
withName:NULL];
|
||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
[aCoder decodeValueOfType:encoding
|
[aCoder decodeValueOfObjCType:encoding
|
||||||
at:elt_get_ptr_to_member(encoding, &newElement)
|
at:elt_get_ptr_to_member(encoding, &newElement)
|
||||||
withName:NULL];
|
withName:NULL];
|
||||||
[self addElement:newElement];
|
[self addElement:newElement];
|
||||||
|
|
|
@ -60,10 +60,10 @@ static BOOL debug_connected_coder = NO;
|
||||||
newsp->connection = c;
|
newsp->connection = c;
|
||||||
newsp->sequence_number = n;
|
newsp->sequence_number = n;
|
||||||
newsp->identifier = i;
|
newsp->identifier = i;
|
||||||
[newsp encodeValueOfSimpleType:@encode(typeof(newsp->sequence_number))
|
[newsp encodeValueOfCType:@encode(typeof(newsp->sequence_number))
|
||||||
at:&(newsp->sequence_number)
|
at:&(newsp->sequence_number)
|
||||||
withName:"ConnectedCoder sequence number"];
|
withName:"ConnectedCoder sequence number"];
|
||||||
[newsp encodeValueOfSimpleType:@encode(typeof(newsp->identifier))
|
[newsp encodeValueOfCType:@encode(typeof(newsp->identifier))
|
||||||
at:&(newsp->identifier)
|
at:&(newsp->identifier)
|
||||||
withName:"ConnectedCoder identifier"];
|
withName:"ConnectedCoder identifier"];
|
||||||
return newsp;
|
return newsp;
|
||||||
|
@ -113,10 +113,10 @@ static BOOL debug_connected_coder = NO;
|
||||||
newsp->connection = [Connection newForInPort:inPort
|
newsp->connection = [Connection newForInPort:inPort
|
||||||
outPort:newsp->remotePort
|
outPort:newsp->remotePort
|
||||||
ancestorConnection:c];
|
ancestorConnection:c];
|
||||||
[newsp decodeValueOfSimpleType:@encode(typeof(newsp->sequence_number))
|
[newsp decodeValueOfCType:@encode(typeof(newsp->sequence_number))
|
||||||
at:&(newsp->sequence_number)
|
at:&(newsp->sequence_number)
|
||||||
withName:NULL];
|
withName:NULL];
|
||||||
[newsp decodeValueOfSimpleType:@encode(typeof(newsp->identifier))
|
[newsp decodeValueOfCType:@encode(typeof(newsp->identifier))
|
||||||
at:&(newsp->identifier)
|
at:&(newsp->identifier)
|
||||||
withName:NULL];
|
withName:NULL];
|
||||||
|
|
||||||
|
|
|
@ -241,7 +241,7 @@ static int messagesReceivedCount;
|
||||||
[op encodeObject:*(id*)datum withName:ENCODED_ARGNAME];
|
[op encodeObject:*(id*)datum withName:ENCODED_ARGNAME];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
[op encodeValueOfType:type at:datum withName:ENCODED_ARGNAME];
|
[op encodeValueOfObjCType:type at:datum withName:ENCODED_ARGNAME];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -269,7 +269,7 @@ static int messagesReceivedCount;
|
||||||
exactly what qualifiers we're using.
|
exactly what qualifiers we're using.
|
||||||
If all selectors included qualifiers and I could make sel_types_match()
|
If all selectors included qualifiers and I could make sel_types_match()
|
||||||
work the way I wanted, we wouldn't need to do this. */
|
work the way I wanted, we wouldn't need to do this. */
|
||||||
[op encodeValueOfSimpleType:@encode(char*)
|
[op encodeValueOfCType:@encode(char*)
|
||||||
at:&type
|
at:&type
|
||||||
withName:"selector type"];
|
withName:"selector type"];
|
||||||
|
|
||||||
|
@ -289,7 +289,7 @@ static int messagesReceivedCount;
|
||||||
assert(ip != (id)-1);
|
assert(ip != (id)-1);
|
||||||
if (!ip)
|
if (!ip)
|
||||||
ip = [self newReceivedReplyRmcWithSequenceNumber:seq_num];
|
ip = [self newReceivedReplyRmcWithSequenceNumber:seq_num];
|
||||||
[ip decodeValueOfType:type at:datum withName:NULL];
|
[ip decodeValueOfObjCType:type at:datum withName:NULL];
|
||||||
if (argnum == last_argnum)
|
if (argnum == last_argnum)
|
||||||
{
|
{
|
||||||
/* this must be here to avoid trashing alloca'ed retframe */
|
/* this must be here to avoid trashing alloca'ed retframe */
|
||||||
|
@ -315,7 +315,7 @@ static int messagesReceivedCount;
|
||||||
|
|
||||||
void decoder (int argnum, void *datum, const char *type)
|
void decoder (int argnum, void *datum, const char *type)
|
||||||
{
|
{
|
||||||
[aRmc decodeValueOfType:type
|
[aRmc decodeValueOfObjCType:type
|
||||||
at:datum
|
at:datum
|
||||||
withName:NULL];
|
withName:NULL];
|
||||||
/* We need this "dismiss" to happen here and not later so that Coder
|
/* We need this "dismiss" to happen here and not later so that Coder
|
||||||
|
@ -338,7 +338,7 @@ static int messagesReceivedCount;
|
||||||
[op encodeObject:*(id*)datum withName:ENCODED_RETNAME];
|
[op encodeObject:*(id*)datum withName:ENCODED_RETNAME];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
[op encodeValueOfType:type at:datum withName:ENCODED_RETNAME];
|
[op encodeValueOfObjCType:type at:datum withName:ENCODED_RETNAME];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -349,7 +349,7 @@ static int messagesReceivedCount;
|
||||||
exactly what qualifiers the forwarder used.
|
exactly what qualifiers the forwarder used.
|
||||||
If all selectors included qualifiers and I could make sel_types_match()
|
If all selectors included qualifiers and I could make sel_types_match()
|
||||||
work the way I wanted, we wouldn't need to do this. */
|
work the way I wanted, we wouldn't need to do this. */
|
||||||
[aRmc decodeValueOfSimpleType:@encode(char*)
|
[aRmc decodeValueOfCType:@encode(char*)
|
||||||
at:&forward_type
|
at:&forward_type
|
||||||
withName:NULL];
|
withName:NULL];
|
||||||
|
|
||||||
|
@ -665,15 +665,15 @@ static int messagesReceivedCount;
|
||||||
newEncodingWithConnection:self
|
newEncodingWithConnection:self
|
||||||
sequenceNumber:seq_num
|
sequenceNumber:seq_num
|
||||||
identifier:METHODTYPE_REQUEST];
|
identifier:METHODTYPE_REQUEST];
|
||||||
[op encodeValueOfType:":"
|
[op encodeValueOfObjCType:":"
|
||||||
at:&sel
|
at:&sel
|
||||||
withName:NULL];
|
withName:NULL];
|
||||||
[op encodeValueOfSimpleType:@encode(unsigned)
|
[op encodeValueOfCType:@encode(unsigned)
|
||||||
at:&target
|
at:&target
|
||||||
withName:NULL];
|
withName:NULL];
|
||||||
[op dismiss];
|
[op dismiss];
|
||||||
ip = [self newReceivedReplyRmcWithSequenceNumber:seq_num];
|
ip = [self newReceivedReplyRmcWithSequenceNumber:seq_num];
|
||||||
[ip decodeValueOfSimpleType:@encode(char*)
|
[ip decodeValueOfCType:@encode(char*)
|
||||||
at:&type
|
at:&type
|
||||||
withName:NULL];
|
withName:NULL];
|
||||||
[ip dismiss];
|
[ip dismiss];
|
||||||
|
@ -695,10 +695,10 @@ static int messagesReceivedCount;
|
||||||
sequenceNumber:[rmc sequenceNumber]
|
sequenceNumber:[rmc sequenceNumber]
|
||||||
identifier:METHODTYPE_REPLY];
|
identifier:METHODTYPE_REPLY];
|
||||||
|
|
||||||
[rmc decodeValueOfType:":"
|
[rmc decodeValueOfObjCType:":"
|
||||||
at:&sel
|
at:&sel
|
||||||
withName:NULL];
|
withName:NULL];
|
||||||
[rmc decodeValueOfSimpleType:@encode(unsigned)
|
[rmc decodeValueOfCType:@encode(unsigned)
|
||||||
at:&target
|
at:&target
|
||||||
withName:NULL];
|
withName:NULL];
|
||||||
/* xxx We should make sure that TARGET is a valid object. */
|
/* xxx We should make sure that TARGET is a valid object. */
|
||||||
|
@ -711,7 +711,7 @@ static int messagesReceivedCount;
|
||||||
type = m->method_types;
|
type = m->method_types;
|
||||||
else
|
else
|
||||||
type = "";
|
type = "";
|
||||||
[op encodeValueOfSimpleType:@encode(char*)
|
[op encodeValueOfCType:@encode(char*)
|
||||||
at:&type
|
at:&type
|
||||||
withName:"Requested Method Type for Target"];
|
withName:"Requested Method Type for Target"];
|
||||||
[op dismiss];
|
[op dismiss];
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
|
|
||||||
- (void) encodeWithCoder: anEncoder
|
- (void) encodeWithCoder: anEncoder
|
||||||
{
|
{
|
||||||
[anEncoder encodeValueOfSimpleType:@encode(unsigned char)
|
[anEncoder encodeValueOfCType:@encode(unsigned char)
|
||||||
at:&_send_behavior
|
at:&_send_behavior
|
||||||
withName:"DelegatePool Send Behavior"];
|
withName:"DelegatePool Send Behavior"];
|
||||||
[anEncoder encodeObject:_list
|
[anEncoder encodeObject:_list
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
/* xxx Should be:
|
/* xxx Should be:
|
||||||
DelegatePool *n = NSAllocateObject(self, 0, [aDecoder objectZone]); */
|
DelegatePool *n = NSAllocateObject(self, 0, [aDecoder objectZone]); */
|
||||||
DelegatePool *n = (id) NSAllocateObject(self, 0, NS_NOZONE);
|
DelegatePool *n = (id) NSAllocateObject(self, 0, NS_NOZONE);
|
||||||
[aDecoder decodeValueOfSimpleType:@encode(unsigned char)
|
[aDecoder decodeValueOfCType:@encode(unsigned char)
|
||||||
at:&(n->_send_behavior)
|
at:&(n->_send_behavior)
|
||||||
withName:NULL];
|
withName:NULL];
|
||||||
[aDecoder decodeObjectAt:&(n->_list)
|
[aDecoder decodeObjectAt:&(n->_list)
|
||||||
|
|
|
@ -96,9 +96,9 @@
|
||||||
const char *encoding = [self contentType];
|
const char *encoding = [self contentType];
|
||||||
|
|
||||||
[super _encodeCollectionWithCoder:aCoder];
|
[super _encodeCollectionWithCoder:aCoder];
|
||||||
[aCoder encodeValueOfType:@encode(char*) at:&encoding
|
[aCoder encodeValueOfObjCType:@encode(char*) at:&encoding
|
||||||
withName:"EltNodeCollector Content Type Encoding"];
|
withName:"EltNodeCollector Content Type Encoding"];
|
||||||
[aCoder encodeValueOfType:"#" at:&_node_class
|
[aCoder encodeValueOfObjCType:"#" at:&_node_class
|
||||||
withName:"EltNodeCollector Content Node Class"];
|
withName:"EltNodeCollector Content Node Class"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,9 +107,9 @@
|
||||||
char *encoding;
|
char *encoding;
|
||||||
|
|
||||||
[super _initCollectionWithCoder:aCoder];
|
[super _initCollectionWithCoder:aCoder];
|
||||||
[aCoder decodeValueOfType:@encode(char*) at:&encoding withName:NULL];
|
[aCoder decodeValueOfObjCType:@encode(char*) at:&encoding withName:NULL];
|
||||||
_comparison_function = elt_get_comparison_function(encoding);
|
_comparison_function = elt_get_comparison_function(encoding);
|
||||||
[aCoder decodeValueOfType:"#" at:&_node_class withName:NULL];
|
[aCoder decodeValueOfObjCType:"#" at:&_node_class withName:NULL];
|
||||||
_contents_collector = nil;
|
_contents_collector = nil;
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1064,12 +1064,12 @@
|
||||||
const char *encoding = [self contentType];
|
const char *encoding = [self contentType];
|
||||||
void archiveElement(elt e)
|
void archiveElement(elt e)
|
||||||
{
|
{
|
||||||
[coder encodeValueOfType:encoding
|
[coder encodeValueOfObjCType:encoding
|
||||||
at:elt_get_ptr_to_member(encoding, &e)
|
at:elt_get_ptr_to_member(encoding, &e)
|
||||||
withName:"IndexedCollection Element"];
|
withName:"IndexedCollection Element"];
|
||||||
}
|
}
|
||||||
|
|
||||||
[coder encodeValueOfSimpleType:@encode(unsigned int)
|
[coder encodeValueOfCType:@encode(unsigned int)
|
||||||
at:&count
|
at:&count
|
||||||
withName:"IndexedCollection Contents Count"];
|
withName:"IndexedCollection Contents Count"];
|
||||||
[self withElementsCall:archiveElement];
|
[self withElementsCall:archiveElement];
|
||||||
|
@ -1081,12 +1081,12 @@
|
||||||
elt newElement;
|
elt newElement;
|
||||||
const char *encoding = [self contentType];
|
const char *encoding = [self contentType];
|
||||||
|
|
||||||
[coder decodeValueOfSimpleType:@encode(unsigned int)
|
[coder decodeValueOfCType:@encode(unsigned int)
|
||||||
at:&count
|
at:&count
|
||||||
withName:NULL];
|
withName:NULL];
|
||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
[coder decodeValueOfType:encoding
|
[coder decodeValueOfObjCType:encoding
|
||||||
at:elt_get_ptr_to_member(encoding, &newElement)
|
at:elt_get_ptr_to_member(encoding, &newElement)
|
||||||
withName:NULL];
|
withName:NULL];
|
||||||
[self appendElement:newElement];
|
[self appendElement:newElement];
|
||||||
|
|
|
@ -465,15 +465,15 @@
|
||||||
const char *ke = [self keyType];
|
const char *ke = [self keyType];
|
||||||
void archiveKeyAndContent(elt key, elt content)
|
void archiveKeyAndContent(elt key, elt content)
|
||||||
{
|
{
|
||||||
[aCoder encodeValueOfType:ke
|
[aCoder encodeValueOfObjCType:ke
|
||||||
at:elt_get_ptr_to_member(ke, &key)
|
at:elt_get_ptr_to_member(ke, &key)
|
||||||
withName:"KeyedCollection key element"];
|
withName:"KeyedCollection key element"];
|
||||||
[aCoder encodeValueOfType:ce
|
[aCoder encodeValueOfObjCType:ce
|
||||||
at:elt_get_ptr_to_member(ce, &content)
|
at:elt_get_ptr_to_member(ce, &content)
|
||||||
withName:"KeyedCollection content element"];
|
withName:"KeyedCollection content element"];
|
||||||
}
|
}
|
||||||
|
|
||||||
[aCoder encodeValueOfSimpleType:@encode(unsigned)
|
[aCoder encodeValueOfCType:@encode(unsigned)
|
||||||
at:&count
|
at:&count
|
||||||
withName:"Collection element count"];
|
withName:"Collection element count"];
|
||||||
[self withKeyElementsAndContentElementsCall:archiveKeyAndContent];
|
[self withKeyElementsAndContentElementsCall:archiveKeyAndContent];
|
||||||
|
@ -486,15 +486,15 @@
|
||||||
const char *ce = [self contentType];
|
const char *ce = [self contentType];
|
||||||
const char *ke = [self keyType];
|
const char *ke = [self keyType];
|
||||||
|
|
||||||
[aCoder decodeValueOfSimpleType:@encode(unsigned)
|
[aCoder decodeValueOfCType:@encode(unsigned)
|
||||||
at:&count
|
at:&count
|
||||||
withName:NULL];
|
withName:NULL];
|
||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
[aCoder decodeValueOfType:ke
|
[aCoder decodeValueOfObjCType:ke
|
||||||
at:elt_get_ptr_to_member(ke, &newKey)
|
at:elt_get_ptr_to_member(ke, &newKey)
|
||||||
withName:NULL];
|
withName:NULL];
|
||||||
[aCoder decodeValueOfType:ce
|
[aCoder decodeValueOfObjCType:ce
|
||||||
at:elt_get_ptr_to_member(ce, &newContent)
|
at:elt_get_ptr_to_member(ce, &newContent)
|
||||||
withName:NULL];
|
withName:NULL];
|
||||||
[self putElement:newContent atKey:newKey];
|
[self putElement:newContent atKey:newKey];
|
||||||
|
|
|
@ -119,9 +119,9 @@ stringDecrementCountAndFillHoleAt(MutableCStringStruct *self,
|
||||||
|
|
||||||
- (void) encodeWithCoder: aCoder
|
- (void) encodeWithCoder: aCoder
|
||||||
{
|
{
|
||||||
[aCoder encodeValueOfType:@encode(unsigned) at:&_capacity
|
[aCoder encodeValueOfObjCType:@encode(unsigned) at:&_capacity
|
||||||
withName:"String capacity"];
|
withName:"String capacity"];
|
||||||
[aCoder encodeValueOfType:@encode(char*) at:&_contents_chars
|
[aCoder encodeValueOfObjCType:@encode(char*) at:&_contents_chars
|
||||||
withName:"String content_chars"];
|
withName:"String content_chars"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,9 +130,9 @@ stringDecrementCountAndFillHoleAt(MutableCStringStruct *self,
|
||||||
MutableCString *n;
|
MutableCString *n;
|
||||||
unsigned cap;
|
unsigned cap;
|
||||||
|
|
||||||
[aCoder decodeValueOfType:@encode(unsigned) at:&cap withName:NULL];
|
[aCoder decodeValueOfObjCType:@encode(unsigned) at:&cap withName:NULL];
|
||||||
[self initWithCapacity:cap];
|
[self initWithCapacity:cap];
|
||||||
[aCoder decodeValueOfType:@encode(char*) at:_contents_chars
|
[aCoder decodeValueOfObjCType:@encode(char*) at:_contents_chars
|
||||||
withName:NULL];
|
withName:NULL];
|
||||||
_count = strlen(_contents_chars);
|
_count = strlen(_contents_chars);
|
||||||
_capacity = cap;
|
_capacity = cap;
|
||||||
|
|
|
@ -59,14 +59,14 @@
|
||||||
|
|
||||||
- (void) encodeWithCoder: aCoder
|
- (void) encodeWithCoder: aCoder
|
||||||
{
|
{
|
||||||
[aCoder encodeValueOfType:@encode(char*) at:&_contents_chars
|
[aCoder encodeValueOfObjCType:@encode(char*) at:&_contents_chars
|
||||||
withName:"Concrete String content_chars"];
|
withName:"Concrete String content_chars"];
|
||||||
}
|
}
|
||||||
|
|
||||||
- initWithCoder: aCoder
|
- initWithCoder: aCoder
|
||||||
{
|
{
|
||||||
[super initWithCoder:aCoder];
|
[super initWithCoder:aCoder];
|
||||||
[aCoder decodeValueOfType:@encode(char*) at:&_contents_chars
|
[aCoder decodeValueOfObjCType:@encode(char*) at:&_contents_chars
|
||||||
withName:NULL];
|
withName:NULL];
|
||||||
_count = strlen(_contents_chars);
|
_count = strlen(_contents_chars);
|
||||||
_free_contents = YES;
|
_free_contents = YES;
|
||||||
|
@ -255,9 +255,9 @@ stringDecrementCountAndFillHoleAt(NSGMutableCStringStruct *self,
|
||||||
|
|
||||||
- (void) encodeWithCoder: aCoder
|
- (void) encodeWithCoder: aCoder
|
||||||
{
|
{
|
||||||
[aCoder encodeValueOfType:@encode(unsigned) at:&_capacity
|
[aCoder encodeValueOfObjCType:@encode(unsigned) at:&_capacity
|
||||||
withName:"String capacity"];
|
withName:"String capacity"];
|
||||||
[aCoder encodeValueOfType:@encode(char*) at:&_contents_chars
|
[aCoder encodeValueOfObjCType:@encode(char*) at:&_contents_chars
|
||||||
withName:"String content_chars"];
|
withName:"String content_chars"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -265,9 +265,9 @@ stringDecrementCountAndFillHoleAt(NSGMutableCStringStruct *self,
|
||||||
{
|
{
|
||||||
unsigned cap;
|
unsigned cap;
|
||||||
|
|
||||||
[aCoder decodeValueOfType:@encode(unsigned) at:&cap withName:NULL];
|
[aCoder decodeValueOfObjCType:@encode(unsigned) at:&cap withName:NULL];
|
||||||
[self initWithCapacity:cap];
|
[self initWithCapacity:cap];
|
||||||
[aCoder decodeValueOfType:@encode(char*) at:&_contents_chars
|
[aCoder decodeValueOfObjCType:@encode(char*) at:&_contents_chars
|
||||||
withName:NULL];
|
withName:NULL];
|
||||||
_count = strlen(_contents_chars);
|
_count = strlen(_contents_chars);
|
||||||
_capacity = cap;
|
_capacity = cap;
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
- (void) encodeValueOfObjCType: (const char*)type
|
- (void) encodeValueOfObjCType: (const char*)type
|
||||||
at: (const void*)address;
|
at: (const void*)address;
|
||||||
{
|
{
|
||||||
[self encodeValueOfType:type at:address
|
[self encodeValueOfObjCType:type at:address
|
||||||
withName:NULL];
|
withName:NULL];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@
|
||||||
- (void) decodeValueOfObjCType: (const char*)type
|
- (void) decodeValueOfObjCType: (const char*)type
|
||||||
at: (void*)address
|
at: (void*)address
|
||||||
{
|
{
|
||||||
[self decodeValueOfType:type at:address
|
[self decodeValueOfObjCType:type at:address
|
||||||
withName:NULL];
|
withName:NULL];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -255,7 +255,7 @@ static Class NXConnectionProxyClass;
|
||||||
|
|
||||||
- encodeData:(void *)data ofType:(const char *)type
|
- encodeData:(void *)data ofType:(const char *)type
|
||||||
{
|
{
|
||||||
[self encodeValueOfType:type at:data withName:NULL];
|
[self encodeValueOfObjCType:type at:data withName:NULL];
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -263,7 +263,7 @@ static Class NXConnectionProxyClass;
|
||||||
{
|
{
|
||||||
char types[16];
|
char types[16];
|
||||||
sprintf(types, "[%dc]", count);
|
sprintf(types, "[%dc]", count);
|
||||||
[self encodeValueOfType:types at:bytes withName:NULL];
|
[self encodeValueOfObjCType:types at:bytes withName:NULL];
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -293,7 +293,7 @@ static Class NXConnectionProxyClass;
|
||||||
|
|
||||||
- decodeData:(void *)d ofType:(const char *)t
|
- decodeData:(void *)d ofType:(const char *)t
|
||||||
{
|
{
|
||||||
[self decodeValueOfType:t at:d withName:NULL];
|
[self decodeValueOfObjCType:t at:d withName:NULL];
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -301,7 +301,7 @@ static Class NXConnectionProxyClass;
|
||||||
{
|
{
|
||||||
char types[16];
|
char types[16];
|
||||||
sprintf(types, "[%dc]", count);
|
sprintf(types, "[%dc]", count);
|
||||||
[self decodeValueOfType:types at:bytes withName:NULL];
|
[self decodeValueOfObjCType:types at:bytes withName:NULL];
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -150,10 +150,10 @@ static inline BOOL class_is_kind_of(Class self, Class aClassObject)
|
||||||
willBeLocal = YES;
|
willBeLocal = YES;
|
||||||
[aRmc encodeObjectBycopy:nil
|
[aRmc encodeObjectBycopy:nil
|
||||||
withName:"Proxy is local on other side"];
|
withName:"Proxy is local on other side"];
|
||||||
[aRmc encodeValueOfType:@encode(unsigned)
|
[aRmc encodeValueOfObjCType:@encode(unsigned)
|
||||||
at:&aTarget
|
at:&aTarget
|
||||||
withName:"Object Proxy target"];
|
withName:"Object Proxy target"];
|
||||||
[aRmc encodeValueOfType:@encode(BOOL)
|
[aRmc encodeValueOfObjCType:@encode(BOOL)
|
||||||
at:&willBeLocal
|
at:&willBeLocal
|
||||||
withName:"Proxy willBeLocal"];
|
withName:"Proxy willBeLocal"];
|
||||||
}
|
}
|
||||||
|
@ -168,10 +168,10 @@ static inline BOOL class_is_kind_of(Class self, Class aClassObject)
|
||||||
triangle connection to */
|
triangle connection to */
|
||||||
[aRmc encodeObjectBycopy:op
|
[aRmc encodeObjectBycopy:op
|
||||||
withName:"Proxy outPort"];
|
withName:"Proxy outPort"];
|
||||||
[aRmc encodeValueOfType:@encode(unsigned)
|
[aRmc encodeValueOfObjCType:@encode(unsigned)
|
||||||
at:&aTarget
|
at:&aTarget
|
||||||
withName:"Object Proxy target"];
|
withName:"Object Proxy target"];
|
||||||
[aRmc encodeValueOfType:@encode(BOOL)
|
[aRmc encodeValueOfObjCType:@encode(BOOL)
|
||||||
at:&willBeLocal
|
at:&willBeLocal
|
||||||
withName:"Proxy willBeLocal"];
|
withName:"Proxy willBeLocal"];
|
||||||
}
|
}
|
||||||
|
@ -186,10 +186,10 @@ static inline BOOL class_is_kind_of(Class self, Class aClassObject)
|
||||||
/* if nil port, other connection will use ConnectedCoder remotePort */
|
/* if nil port, other connection will use ConnectedCoder remotePort */
|
||||||
[aRmc encodeObjectBycopy:nil
|
[aRmc encodeObjectBycopy:nil
|
||||||
withName:"Proxy outPort == remotePort"];
|
withName:"Proxy outPort == remotePort"];
|
||||||
[aRmc encodeValueOfType:@encode(unsigned)
|
[aRmc encodeValueOfObjCType:@encode(unsigned)
|
||||||
at:&aTarget
|
at:&aTarget
|
||||||
withName:"Object Proxy target"];
|
withName:"Object Proxy target"];
|
||||||
[aRmc encodeValueOfType:@encode(BOOL)
|
[aRmc encodeValueOfObjCType:@encode(BOOL)
|
||||||
at:&willBeLocal
|
at:&willBeLocal
|
||||||
withName:"Proxy willBeLocal"];
|
withName:"Proxy willBeLocal"];
|
||||||
}
|
}
|
||||||
|
@ -206,10 +206,10 @@ static inline BOOL class_is_kind_of(Class self, Class aClassObject)
|
||||||
[self error:"Proxy objects only code with ConnectedCoder class"];
|
[self error:"Proxy objects only code with ConnectedCoder class"];
|
||||||
assert([aRmc connection]);
|
assert([aRmc connection]);
|
||||||
[aRmc decodeObjectAt:&newConnectionOutPort withName:NULL];
|
[aRmc decodeObjectAt:&newConnectionOutPort withName:NULL];
|
||||||
[aRmc decodeValueOfType:@encode(unsigned)
|
[aRmc decodeValueOfObjCType:@encode(unsigned)
|
||||||
at:&new_target
|
at:&new_target
|
||||||
withName:NULL];
|
withName:NULL];
|
||||||
[aRmc decodeValueOfType:@encode(BOOL)
|
[aRmc decodeValueOfObjCType:@encode(BOOL)
|
||||||
at:&willBeLocal
|
at:&willBeLocal
|
||||||
withName:NULL];
|
withName:NULL];
|
||||||
if (newConnectionOutPort)
|
if (newConnectionOutPort)
|
||||||
|
|
|
@ -41,13 +41,13 @@
|
||||||
- (void) encodeWithCoder: aCoder
|
- (void) encodeWithCoder: aCoder
|
||||||
{
|
{
|
||||||
[super encodeWithCoder:aCoder];
|
[super encodeWithCoder:aCoder];
|
||||||
[aCoder encodeValueOfType:@encode(BOOL) at:&_red withName:"RBTreeNode isRed"];
|
[aCoder encodeValueOfObjCType:@encode(BOOL) at:&_red withName:"RBTreeNode isRed"];
|
||||||
}
|
}
|
||||||
|
|
||||||
- initWithCoder: aCoder
|
- initWithCoder: aCoder
|
||||||
{
|
{
|
||||||
[self initWithCoder:aCoder];
|
[self initWithCoder:aCoder];
|
||||||
[aCoder decodeValueOfType:@encode(BOOL) at:&_red withName:NULL];
|
[aCoder decodeValueOfObjCType:@encode(BOOL) at:&_red withName:NULL];
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,10 +66,10 @@
|
||||||
const char *enc = [self contentType];
|
const char *enc = [self contentType];
|
||||||
|
|
||||||
[super _encodeCollectionWithCoder:aCoder];
|
[super _encodeCollectionWithCoder:aCoder];
|
||||||
[aCoder encodeValueOfSimpleType:@encode(char*)
|
[aCoder encodeValueOfCType:@encode(char*)
|
||||||
at:&enc
|
at:&enc
|
||||||
withName:"Set contents encoding"];
|
withName:"Set contents encoding"];
|
||||||
[aCoder encodeValueOfSimpleType:@encode(unsigned)
|
[aCoder encodeValueOfCType:@encode(unsigned)
|
||||||
at:&(_contents_hash->size)
|
at:&(_contents_hash->size)
|
||||||
withName:"Set contents capacity"];
|
withName:"Set contents capacity"];
|
||||||
return;
|
return;
|
||||||
|
@ -81,10 +81,10 @@
|
||||||
unsigned size;
|
unsigned size;
|
||||||
|
|
||||||
[super _initCollectionWithCoder:aCoder];
|
[super _initCollectionWithCoder:aCoder];
|
||||||
[aCoder decodeValueOfSimpleType:@encode(char*)
|
[aCoder decodeValueOfCType:@encode(char*)
|
||||||
at:&encoding
|
at:&encoding
|
||||||
withName:NULL];
|
withName:NULL];
|
||||||
[aCoder decodeValueOfSimpleType:@encode(unsigned)
|
[aCoder decodeValueOfCType:@encode(unsigned)
|
||||||
at:&size
|
at:&size
|
||||||
withName:NULL];
|
withName:NULL];
|
||||||
_contents_hash =
|
_contents_hash =
|
||||||
|
|
|
@ -385,7 +385,7 @@ or
|
||||||
|
|
||||||
- (void) encodeWithCoder: aCoder
|
- (void) encodeWithCoder: aCoder
|
||||||
{
|
{
|
||||||
[aCoder encodeValueOfType:@encode(typeof(sockPort.sin_port))
|
[aCoder encodeValueOfObjCType:@encode(typeof(sockPort.sin_port))
|
||||||
at:&sockPort.sin_port
|
at:&sockPort.sin_port
|
||||||
withName:"socket number"];
|
withName:"socket number"];
|
||||||
if (![self isSoft])
|
if (![self isSoft])
|
||||||
|
@ -398,13 +398,13 @@ or
|
||||||
if (hp == 0)
|
if (hp == 0)
|
||||||
[self error:"gethostbyname(): can't get host info"];
|
[self error:"gethostbyname(): can't get host info"];
|
||||||
bcopy(hp->h_addr, &sp.sin_addr, hp->h_length);
|
bcopy(hp->h_addr, &sp.sin_addr, hp->h_length);
|
||||||
[aCoder encodeValueOfType:@encode(typeof(sp.sin_addr.s_addr))
|
[aCoder encodeValueOfObjCType:@encode(typeof(sp.sin_addr.s_addr))
|
||||||
at:&sp.sin_addr.s_addr
|
at:&sp.sin_addr.s_addr
|
||||||
withName:"inet address"];
|
withName:"inet address"];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
[aCoder encodeValueOfType:@encode(typeof(sockPort.sin_addr.s_addr))
|
[aCoder encodeValueOfObjCType:@encode(typeof(sockPort.sin_addr.s_addr))
|
||||||
at:&sockPort.sin_addr.s_addr
|
at:&sockPort.sin_addr.s_addr
|
||||||
withName:"inet address"];
|
withName:"inet address"];
|
||||||
}
|
}
|
||||||
|
@ -415,10 +415,10 @@ or
|
||||||
sockport_t sp;
|
sockport_t sp;
|
||||||
|
|
||||||
sp.sin_family = AF_INET;
|
sp.sin_family = AF_INET;
|
||||||
[aCoder decodeValueOfType:@encode(typeof(sp.sin_port))
|
[aCoder decodeValueOfObjCType:@encode(typeof(sp.sin_port))
|
||||||
at:&sp.sin_port
|
at:&sp.sin_port
|
||||||
withName:NULL];
|
withName:NULL];
|
||||||
[aCoder decodeValueOfType:@encode(typeof(sp.sin_addr.s_addr))
|
[aCoder decodeValueOfObjCType:@encode(typeof(sp.sin_addr.s_addr))
|
||||||
at:&sp.sin_addr.s_addr
|
at:&sp.sin_addr.s_addr
|
||||||
withName:NULL];
|
withName:NULL];
|
||||||
return [SocketPort newForSockPort:sp];
|
return [SocketPort newForSockPort:sp];
|
||||||
|
|
|
@ -58,7 +58,7 @@ static BOOL debug_textcoder = NO;
|
||||||
#define ENCODER_FORMAT(TYPE, CONVERSION) \
|
#define ENCODER_FORMAT(TYPE, CONVERSION) \
|
||||||
"%*s<%s> (" XSTR(TYPE) ") = %" XSTR(CONVERSION) "\n"
|
"%*s<%s> (" XSTR(TYPE) ") = %" XSTR(CONVERSION) "\n"
|
||||||
|
|
||||||
- (void) encodeValueOfSimpleType: (const char*)type
|
- (void) encodeValueOfCType: (const char*)type
|
||||||
at: (const void*)d
|
at: (const void*)d
|
||||||
withName: (const char *)name
|
withName: (const char *)name
|
||||||
{
|
{
|
||||||
|
@ -128,7 +128,7 @@ if (debug_textcoder) \
|
||||||
XSTR(TYPE), *(TYPE*)d];
|
XSTR(TYPE), *(TYPE*)d];
|
||||||
|
|
||||||
|
|
||||||
- (void) decodeValueOfSimpleType: (const char*)type
|
- (void) decodeValueOfCType: (const char*)type
|
||||||
at: (void*)d
|
at: (void*)d
|
||||||
withName: (const char **)name
|
withName: (const char **)name
|
||||||
{
|
{
|
||||||
|
|
|
@ -288,7 +288,7 @@ make_method_call(const char *forward_type,
|
||||||
|
|
||||||
void f_decode_rets (int argnum, void *datum, const char *type)
|
void f_decode_rets (int argnum, void *datum, const char *type)
|
||||||
{
|
{
|
||||||
[ip decodeValueOfType:type
|
[ip decodeValueOfObjCType:type
|
||||||
at:datum
|
at:datum
|
||||||
withName:NULL];
|
withName:NULL];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue