diff --git a/Source/Array.m b/Source/Array.m index 1d741a8fc..35c0c59c0 100644 --- a/Source/Array.m +++ b/Source/Array.m @@ -67,13 +67,13 @@ const char *encoding = [self contentType]; [super _encodeCollectionWithCoder:coder]; - [coder encodeValueOfSimpleType:@encode(char*) + [coder encodeValueOfCType:@encode(char*) at:&encoding withName:"Array Encoding Type"]; - [coder encodeValueOfSimpleType:@encode(unsigned) + [coder encodeValueOfCType:@encode(unsigned) at:&_grow_factor withName:"Array Grow Factor"]; - [coder encodeValueOfSimpleType:@encode(unsigned) + [coder encodeValueOfCType:@encode(unsigned) at:&_capacity withName:"Array Capacity"]; } @@ -82,15 +82,15 @@ { char *encoding; [super _initCollectionWithCoder:coder]; - [coder decodeValueOfSimpleType:@encode(char*) + [coder decodeValueOfCType:@encode(char*) at:&encoding withName:NULL]; _comparison_function = elt_get_comparison_function(encoding); - [coder decodeValueOfSimpleType:@encode(unsigned) + [coder decodeValueOfCType:@encode(unsigned) at:&_grow_factor withName:NULL]; _count = 0; - [coder decodeValueOfSimpleType:@encode(unsigned) + [coder decodeValueOfCType:@encode(unsigned) at:&_capacity withName:NULL]; OBJC_MALLOC(_contents_array, elt, _capacity); diff --git a/Source/BinaryCoder.m b/Source/BinaryCoder.m index b01353ef0..2be184fc8 100644 --- a/Source/BinaryCoder.m +++ b/Source/BinaryCoder.m @@ -66,7 +66,7 @@ static BOOL debug_binary_coder = NO; return self; } -- (void) encodeValueOfSimpleType: (const char*)type +- (void) encodeValueOfCType: (const char*)type at: (const void*)d withName: (const char *)name { @@ -75,7 +75,7 @@ static BOOL debug_binary_coder = NO; if (debug_binary_coder) { [[BinaryCoder debugStderrCoder] - encodeValueOfSimpleType:type + encodeValueOfCType:type at:d withName:name]; } @@ -98,7 +98,7 @@ static BOOL debug_binary_coder = NO; case _C_CHARPTR: { int length = strlen(*(char**)d); - [self encodeValueOfSimpleType:@encode(int) + [self encodeValueOfCType:@encode(int) at:&length withName:"BinaryCoder char* length"]; [stream writeBytes:*(char**)d length:length]; break; @@ -172,7 +172,7 @@ static BOOL debug_binary_coder = NO; char buf[64]; char *s = buf; sprintf(buf, "%f", *(float*)d); - [self encodeValueOfSimpleType:@encode(char*) + [self encodeValueOfCType:@encode(char*) at:&s withName:"BinaryCoder float"]; break; } @@ -181,7 +181,7 @@ static BOOL debug_binary_coder = NO; char buf[64]; char *s = buf; sprintf(buf, "%f", *(double*)d); - [self encodeValueOfSimpleType:@encode(char*) + [self encodeValueOfCType:@encode(char*) at:&s withName:"BinaryCoder double"]; break; } @@ -190,7 +190,7 @@ static BOOL debug_binary_coder = NO; } } -- (void) decodeValueOfSimpleType: (const char*)type +- (void) decodeValueOfCType: (const char*)type at: (void*)d withName: (const char **)namePtr { @@ -216,7 +216,7 @@ static BOOL debug_binary_coder = NO; case _C_CHARPTR: { int length; - [self decodeValueOfSimpleType:@encode(int) + [self decodeValueOfCType:@encode(int) at:&length withName:NULL]; OBJC_MALLOC(*(char**)d, char, length+1); [stream readBytes:*(char**)d length:length]; @@ -293,7 +293,7 @@ static BOOL debug_binary_coder = NO; case _C_FLT: { 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) [self error:"expected float, got %s", buf]; (*objc_free)(buf); @@ -302,7 +302,7 @@ static BOOL debug_binary_coder = NO; case _C_DBL: { 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) [self error:"expected double, got %s", buf]; (*objc_free)(buf); @@ -315,7 +315,7 @@ static BOOL debug_binary_coder = NO; if (debug_binary_coder) { [[BinaryCoder debugStderrCoder] - encodeValueOfSimpleType:type + encodeValueOfCType:type at:d withName:"decoding unnamed"]; } diff --git a/Source/Collection.m b/Source/Collection.m index 51f4d3bc0..b6d21189a 100644 --- a/Source/Collection.m +++ b/Source/Collection.m @@ -1301,12 +1301,12 @@ for info about latest version.", const char *encoding = [self contentType]; void archiveElement(elt e) { - [aCoder encodeValueOfType:encoding + [aCoder encodeValueOfObjCType:encoding at:elt_get_ptr_to_member(encoding, &e) withName:"Collection element"]; } - [aCoder encodeValueOfSimpleType:@encode(unsigned) + [aCoder encodeValueOfCType:@encode(unsigned) at:&count withName:"Collection element count"]; [self withElementsCall:archiveElement]; @@ -1318,12 +1318,12 @@ for info about latest version.", elt newElement; const char *encoding = [self contentType]; - [aCoder decodeValueOfSimpleType:@encode(unsigned) + [aCoder decodeValueOfCType:@encode(unsigned) at:&count withName:NULL]; for (i = 0; i < count; i++) { - [aCoder decodeValueOfType:encoding + [aCoder decodeValueOfObjCType:encoding at:elt_get_ptr_to_member(encoding, &newElement) withName:NULL]; [self addElement:newElement]; diff --git a/Source/ConnectedCoder.m b/Source/ConnectedCoder.m index 0588a6cae..ec0e25fcd 100644 --- a/Source/ConnectedCoder.m +++ b/Source/ConnectedCoder.m @@ -60,10 +60,10 @@ static BOOL debug_connected_coder = NO; newsp->connection = c; newsp->sequence_number = n; newsp->identifier = i; - [newsp encodeValueOfSimpleType:@encode(typeof(newsp->sequence_number)) + [newsp encodeValueOfCType:@encode(typeof(newsp->sequence_number)) at:&(newsp->sequence_number) withName:"ConnectedCoder sequence number"]; - [newsp encodeValueOfSimpleType:@encode(typeof(newsp->identifier)) + [newsp encodeValueOfCType:@encode(typeof(newsp->identifier)) at:&(newsp->identifier) withName:"ConnectedCoder identifier"]; return newsp; @@ -113,10 +113,10 @@ static BOOL debug_connected_coder = NO; newsp->connection = [Connection newForInPort:inPort outPort:newsp->remotePort ancestorConnection:c]; - [newsp decodeValueOfSimpleType:@encode(typeof(newsp->sequence_number)) + [newsp decodeValueOfCType:@encode(typeof(newsp->sequence_number)) at:&(newsp->sequence_number) withName:NULL]; - [newsp decodeValueOfSimpleType:@encode(typeof(newsp->identifier)) + [newsp decodeValueOfCType:@encode(typeof(newsp->identifier)) at:&(newsp->identifier) withName:NULL]; diff --git a/Source/Connection.m b/Source/Connection.m index 35932b480..ffec0d33d 100644 --- a/Source/Connection.m +++ b/Source/Connection.m @@ -241,7 +241,7 @@ static int messagesReceivedCount; [op encodeObject:*(id*)datum withName:ENCODED_ARGNAME]; break; 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. If all selectors included qualifiers and I could make sel_types_match() work the way I wanted, we wouldn't need to do this. */ - [op encodeValueOfSimpleType:@encode(char*) + [op encodeValueOfCType:@encode(char*) at:&type withName:"selector type"]; @@ -289,7 +289,7 @@ static int messagesReceivedCount; assert(ip != (id)-1); if (!ip) ip = [self newReceivedReplyRmcWithSequenceNumber:seq_num]; - [ip decodeValueOfType:type at:datum withName:NULL]; + [ip decodeValueOfObjCType:type at:datum withName:NULL]; if (argnum == last_argnum) { /* 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) { - [aRmc decodeValueOfType:type + [aRmc decodeValueOfObjCType:type at:datum withName:NULL]; /* 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]; break; 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. If all selectors included qualifiers and I could make sel_types_match() work the way I wanted, we wouldn't need to do this. */ - [aRmc decodeValueOfSimpleType:@encode(char*) + [aRmc decodeValueOfCType:@encode(char*) at:&forward_type withName:NULL]; @@ -665,15 +665,15 @@ static int messagesReceivedCount; newEncodingWithConnection:self sequenceNumber:seq_num identifier:METHODTYPE_REQUEST]; - [op encodeValueOfType:":" + [op encodeValueOfObjCType:":" at:&sel withName:NULL]; - [op encodeValueOfSimpleType:@encode(unsigned) + [op encodeValueOfCType:@encode(unsigned) at:&target withName:NULL]; [op dismiss]; ip = [self newReceivedReplyRmcWithSequenceNumber:seq_num]; - [ip decodeValueOfSimpleType:@encode(char*) + [ip decodeValueOfCType:@encode(char*) at:&type withName:NULL]; [ip dismiss]; @@ -695,10 +695,10 @@ static int messagesReceivedCount; sequenceNumber:[rmc sequenceNumber] identifier:METHODTYPE_REPLY]; - [rmc decodeValueOfType:":" + [rmc decodeValueOfObjCType:":" at:&sel withName:NULL]; - [rmc decodeValueOfSimpleType:@encode(unsigned) + [rmc decodeValueOfCType:@encode(unsigned) at:&target withName:NULL]; /* xxx We should make sure that TARGET is a valid object. */ @@ -711,7 +711,7 @@ static int messagesReceivedCount; type = m->method_types; else type = ""; - [op encodeValueOfSimpleType:@encode(char*) + [op encodeValueOfCType:@encode(char*) at:&type withName:"Requested Method Type for Target"]; [op dismiss]; diff --git a/Source/DelegatePool.m b/Source/DelegatePool.m index 0276880d0..d8733f6fe 100644 --- a/Source/DelegatePool.m +++ b/Source/DelegatePool.m @@ -53,7 +53,7 @@ - (void) encodeWithCoder: anEncoder { - [anEncoder encodeValueOfSimpleType:@encode(unsigned char) + [anEncoder encodeValueOfCType:@encode(unsigned char) at:&_send_behavior withName:"DelegatePool Send Behavior"]; [anEncoder encodeObject:_list @@ -65,7 +65,7 @@ /* xxx Should be: DelegatePool *n = NSAllocateObject(self, 0, [aDecoder objectZone]); */ DelegatePool *n = (id) NSAllocateObject(self, 0, NS_NOZONE); - [aDecoder decodeValueOfSimpleType:@encode(unsigned char) + [aDecoder decodeValueOfCType:@encode(unsigned char) at:&(n->_send_behavior) withName:NULL]; [aDecoder decodeObjectAt:&(n->_list) diff --git a/Source/EltNodeCollector.m b/Source/EltNodeCollector.m index 5ecd89c10..ab36917d2 100644 --- a/Source/EltNodeCollector.m +++ b/Source/EltNodeCollector.m @@ -96,9 +96,9 @@ const char *encoding = [self contentType]; [super _encodeCollectionWithCoder:aCoder]; - [aCoder encodeValueOfType:@encode(char*) at:&encoding + [aCoder encodeValueOfObjCType:@encode(char*) at:&encoding withName:"EltNodeCollector Content Type Encoding"]; - [aCoder encodeValueOfType:"#" at:&_node_class + [aCoder encodeValueOfObjCType:"#" at:&_node_class withName:"EltNodeCollector Content Node Class"]; } @@ -107,9 +107,9 @@ char *encoding; [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); - [aCoder decodeValueOfType:"#" at:&_node_class withName:NULL]; + [aCoder decodeValueOfObjCType:"#" at:&_node_class withName:NULL]; _contents_collector = nil; return self; } diff --git a/Source/IndexedCollection.m b/Source/IndexedCollection.m index a120f18fc..5c17c1a63 100644 --- a/Source/IndexedCollection.m +++ b/Source/IndexedCollection.m @@ -1064,12 +1064,12 @@ const char *encoding = [self contentType]; void archiveElement(elt e) { - [coder encodeValueOfType:encoding + [coder encodeValueOfObjCType:encoding at:elt_get_ptr_to_member(encoding, &e) withName:"IndexedCollection Element"]; } - [coder encodeValueOfSimpleType:@encode(unsigned int) + [coder encodeValueOfCType:@encode(unsigned int) at:&count withName:"IndexedCollection Contents Count"]; [self withElementsCall:archiveElement]; @@ -1081,12 +1081,12 @@ elt newElement; const char *encoding = [self contentType]; - [coder decodeValueOfSimpleType:@encode(unsigned int) + [coder decodeValueOfCType:@encode(unsigned int) at:&count withName:NULL]; for (i = 0; i < count; i++) { - [coder decodeValueOfType:encoding + [coder decodeValueOfObjCType:encoding at:elt_get_ptr_to_member(encoding, &newElement) withName:NULL]; [self appendElement:newElement]; diff --git a/Source/KeyedCollection.m b/Source/KeyedCollection.m index c78ca4a76..d37fb2f85 100644 --- a/Source/KeyedCollection.m +++ b/Source/KeyedCollection.m @@ -465,15 +465,15 @@ const char *ke = [self keyType]; void archiveKeyAndContent(elt key, elt content) { - [aCoder encodeValueOfType:ke + [aCoder encodeValueOfObjCType:ke at:elt_get_ptr_to_member(ke, &key) withName:"KeyedCollection key element"]; - [aCoder encodeValueOfType:ce + [aCoder encodeValueOfObjCType:ce at:elt_get_ptr_to_member(ce, &content) withName:"KeyedCollection content element"]; } - [aCoder encodeValueOfSimpleType:@encode(unsigned) + [aCoder encodeValueOfCType:@encode(unsigned) at:&count withName:"Collection element count"]; [self withKeyElementsAndContentElementsCall:archiveKeyAndContent]; @@ -486,15 +486,15 @@ const char *ce = [self contentType]; const char *ke = [self keyType]; - [aCoder decodeValueOfSimpleType:@encode(unsigned) + [aCoder decodeValueOfCType:@encode(unsigned) at:&count withName:NULL]; for (i = 0; i < count; i++) { - [aCoder decodeValueOfType:ke + [aCoder decodeValueOfObjCType:ke at:elt_get_ptr_to_member(ke, &newKey) withName:NULL]; - [aCoder decodeValueOfType:ce + [aCoder decodeValueOfObjCType:ce at:elt_get_ptr_to_member(ce, &newContent) withName:NULL]; [self putElement:newContent atKey:newKey]; diff --git a/Source/MutableCString.m b/Source/MutableCString.m index 36d8cbe96..60a31cce6 100644 --- a/Source/MutableCString.m +++ b/Source/MutableCString.m @@ -119,9 +119,9 @@ stringDecrementCountAndFillHoleAt(MutableCStringStruct *self, - (void) encodeWithCoder: aCoder { - [aCoder encodeValueOfType:@encode(unsigned) at:&_capacity + [aCoder encodeValueOfObjCType:@encode(unsigned) at:&_capacity withName:"String capacity"]; - [aCoder encodeValueOfType:@encode(char*) at:&_contents_chars + [aCoder encodeValueOfObjCType:@encode(char*) at:&_contents_chars withName:"String content_chars"]; } @@ -130,9 +130,9 @@ stringDecrementCountAndFillHoleAt(MutableCStringStruct *self, MutableCString *n; unsigned cap; - [aCoder decodeValueOfType:@encode(unsigned) at:&cap withName:NULL]; + [aCoder decodeValueOfObjCType:@encode(unsigned) at:&cap withName:NULL]; [self initWithCapacity:cap]; - [aCoder decodeValueOfType:@encode(char*) at:_contents_chars + [aCoder decodeValueOfObjCType:@encode(char*) at:_contents_chars withName:NULL]; _count = strlen(_contents_chars); _capacity = cap; diff --git a/Source/NSGCString.m b/Source/NSGCString.m index 1ff4c12a0..d15bad42f 100644 --- a/Source/NSGCString.m +++ b/Source/NSGCString.m @@ -59,14 +59,14 @@ - (void) encodeWithCoder: aCoder { - [aCoder encodeValueOfType:@encode(char*) at:&_contents_chars + [aCoder encodeValueOfObjCType:@encode(char*) at:&_contents_chars withName:"Concrete String content_chars"]; } - initWithCoder: aCoder { [super initWithCoder:aCoder]; - [aCoder decodeValueOfType:@encode(char*) at:&_contents_chars + [aCoder decodeValueOfObjCType:@encode(char*) at:&_contents_chars withName:NULL]; _count = strlen(_contents_chars); _free_contents = YES; @@ -255,9 +255,9 @@ stringDecrementCountAndFillHoleAt(NSGMutableCStringStruct *self, - (void) encodeWithCoder: aCoder { - [aCoder encodeValueOfType:@encode(unsigned) at:&_capacity + [aCoder encodeValueOfObjCType:@encode(unsigned) at:&_capacity withName:"String capacity"]; - [aCoder encodeValueOfType:@encode(char*) at:&_contents_chars + [aCoder encodeValueOfObjCType:@encode(char*) at:&_contents_chars withName:"String content_chars"]; } @@ -265,9 +265,9 @@ stringDecrementCountAndFillHoleAt(NSGMutableCStringStruct *self, { unsigned cap; - [aCoder decodeValueOfType:@encode(unsigned) at:&cap withName:NULL]; + [aCoder decodeValueOfObjCType:@encode(unsigned) at:&cap withName:NULL]; [self initWithCapacity:cap]; - [aCoder decodeValueOfType:@encode(char*) at:&_contents_chars + [aCoder decodeValueOfObjCType:@encode(char*) at:&_contents_chars withName:NULL]; _count = strlen(_contents_chars); _capacity = cap; diff --git a/Source/NSGCoder.m b/Source/NSGCoder.m index be56da185..4cf19d80d 100644 --- a/Source/NSGCoder.m +++ b/Source/NSGCoder.m @@ -51,7 +51,7 @@ - (void) encodeValueOfObjCType: (const char*)type at: (const void*)address; { - [self encodeValueOfType:type at:address + [self encodeValueOfObjCType:type at:address withName:NULL]; } @@ -85,7 +85,7 @@ - (void) decodeValueOfObjCType: (const char*)type at: (void*)address { - [self decodeValueOfType:type at:address + [self decodeValueOfObjCType:type at:address withName:NULL]; } diff --git a/Source/NXConnection.m b/Source/NXConnection.m index 134f1ac1d..2b251e9d0 100644 --- a/Source/NXConnection.m +++ b/Source/NXConnection.m @@ -255,7 +255,7 @@ static Class NXConnectionProxyClass; - encodeData:(void *)data ofType:(const char *)type { - [self encodeValueOfType:type at:data withName:NULL]; + [self encodeValueOfObjCType:type at:data withName:NULL]; return self; } @@ -263,7 +263,7 @@ static Class NXConnectionProxyClass; { char types[16]; sprintf(types, "[%dc]", count); - [self encodeValueOfType:types at:bytes withName:NULL]; + [self encodeValueOfObjCType:types at:bytes withName:NULL]; return self; } @@ -293,7 +293,7 @@ static Class NXConnectionProxyClass; - decodeData:(void *)d ofType:(const char *)t { - [self decodeValueOfType:t at:d withName:NULL]; + [self decodeValueOfObjCType:t at:d withName:NULL]; return self; } @@ -301,7 +301,7 @@ static Class NXConnectionProxyClass; { char types[16]; sprintf(types, "[%dc]", count); - [self decodeValueOfType:types at:bytes withName:NULL]; + [self decodeValueOfObjCType:types at:bytes withName:NULL]; return self; } diff --git a/Source/Proxy.m b/Source/Proxy.m index 4a5826f01..e519059bd 100644 --- a/Source/Proxy.m +++ b/Source/Proxy.m @@ -150,10 +150,10 @@ static inline BOOL class_is_kind_of(Class self, Class aClassObject) willBeLocal = YES; [aRmc encodeObjectBycopy:nil withName:"Proxy is local on other side"]; - [aRmc encodeValueOfType:@encode(unsigned) + [aRmc encodeValueOfObjCType:@encode(unsigned) at:&aTarget withName:"Object Proxy target"]; - [aRmc encodeValueOfType:@encode(BOOL) + [aRmc encodeValueOfObjCType:@encode(BOOL) at:&willBeLocal withName:"Proxy willBeLocal"]; } @@ -168,10 +168,10 @@ static inline BOOL class_is_kind_of(Class self, Class aClassObject) triangle connection to */ [aRmc encodeObjectBycopy:op withName:"Proxy outPort"]; - [aRmc encodeValueOfType:@encode(unsigned) + [aRmc encodeValueOfObjCType:@encode(unsigned) at:&aTarget withName:"Object Proxy target"]; - [aRmc encodeValueOfType:@encode(BOOL) + [aRmc encodeValueOfObjCType:@encode(BOOL) at:&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 */ [aRmc encodeObjectBycopy:nil withName:"Proxy outPort == remotePort"]; - [aRmc encodeValueOfType:@encode(unsigned) + [aRmc encodeValueOfObjCType:@encode(unsigned) at:&aTarget withName:"Object Proxy target"]; - [aRmc encodeValueOfType:@encode(BOOL) + [aRmc encodeValueOfObjCType:@encode(BOOL) at:&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"]; assert([aRmc connection]); [aRmc decodeObjectAt:&newConnectionOutPort withName:NULL]; - [aRmc decodeValueOfType:@encode(unsigned) + [aRmc decodeValueOfObjCType:@encode(unsigned) at:&new_target withName:NULL]; - [aRmc decodeValueOfType:@encode(BOOL) + [aRmc decodeValueOfObjCType:@encode(BOOL) at:&willBeLocal withName:NULL]; if (newConnectionOutPort) diff --git a/Source/RBTreeNode.m b/Source/RBTreeNode.m index 2d52c879e..6a63abfe5 100644 --- a/Source/RBTreeNode.m +++ b/Source/RBTreeNode.m @@ -41,13 +41,13 @@ - (void) 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 { [self initWithCoder:aCoder]; - [aCoder decodeValueOfType:@encode(BOOL) at:&_red withName:NULL]; + [aCoder decodeValueOfObjCType:@encode(BOOL) at:&_red withName:NULL]; return self; } diff --git a/Source/Set.m b/Source/Set.m index dbb907d68..ba481d591 100644 --- a/Source/Set.m +++ b/Source/Set.m @@ -66,10 +66,10 @@ const char *enc = [self contentType]; [super _encodeCollectionWithCoder:aCoder]; - [aCoder encodeValueOfSimpleType:@encode(char*) + [aCoder encodeValueOfCType:@encode(char*) at:&enc withName:"Set contents encoding"]; - [aCoder encodeValueOfSimpleType:@encode(unsigned) + [aCoder encodeValueOfCType:@encode(unsigned) at:&(_contents_hash->size) withName:"Set contents capacity"]; return; @@ -81,10 +81,10 @@ unsigned size; [super _initCollectionWithCoder:aCoder]; - [aCoder decodeValueOfSimpleType:@encode(char*) + [aCoder decodeValueOfCType:@encode(char*) at:&encoding withName:NULL]; - [aCoder decodeValueOfSimpleType:@encode(unsigned) + [aCoder decodeValueOfCType:@encode(unsigned) at:&size withName:NULL]; _contents_hash = diff --git a/Source/SocketPort.m b/Source/SocketPort.m index 409216f84..7cd773c4c 100644 --- a/Source/SocketPort.m +++ b/Source/SocketPort.m @@ -385,7 +385,7 @@ or - (void) encodeWithCoder: aCoder { - [aCoder encodeValueOfType:@encode(typeof(sockPort.sin_port)) + [aCoder encodeValueOfObjCType:@encode(typeof(sockPort.sin_port)) at:&sockPort.sin_port withName:"socket number"]; if (![self isSoft]) @@ -398,13 +398,13 @@ or if (hp == 0) [self error:"gethostbyname(): can't get host info"]; 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 withName:"inet address"]; } 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 withName:"inet address"]; } @@ -415,10 +415,10 @@ or sockport_t sp; sp.sin_family = AF_INET; - [aCoder decodeValueOfType:@encode(typeof(sp.sin_port)) + [aCoder decodeValueOfObjCType:@encode(typeof(sp.sin_port)) at:&sp.sin_port 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 withName:NULL]; return [SocketPort newForSockPort:sp]; diff --git a/Source/TextCoder.m b/Source/TextCoder.m index 386098e5b..70f8a0e80 100644 --- a/Source/TextCoder.m +++ b/Source/TextCoder.m @@ -58,7 +58,7 @@ static BOOL debug_textcoder = NO; #define ENCODER_FORMAT(TYPE, CONVERSION) \ "%*s<%s> (" XSTR(TYPE) ") = %" XSTR(CONVERSION) "\n" -- (void) encodeValueOfSimpleType: (const char*)type +- (void) encodeValueOfCType: (const char*)type at: (const void*)d withName: (const char *)name { @@ -128,7 +128,7 @@ if (debug_textcoder) \ XSTR(TYPE), *(TYPE*)d]; -- (void) decodeValueOfSimpleType: (const char*)type +- (void) decodeValueOfCType: (const char*)type at: (void*)d withName: (const char **)name { diff --git a/Source/argframe.m b/Source/argframe.m index 234277020..0756f4065 100644 --- a/Source/argframe.m +++ b/Source/argframe.m @@ -288,7 +288,7 @@ make_method_call(const char *forward_type, void f_decode_rets (int argnum, void *datum, const char *type) { - [ip decodeValueOfType:type + [ip decodeValueOfObjCType:type at:datum withName:NULL]; }