diff --git a/Source/CStream.m b/Source/CStream.m index 4af0ce3fc..d72e31919 100644 --- a/Source/CStream.m +++ b/Source/CStream.m @@ -172,6 +172,40 @@ id CStreamSignatureMismatchException = @"CStreamSignatureMismatchException"; /* Encoding/decoding indentation */ +- (void) encodeWithName: (id ) name + valuesOfCTypes: (const char *) types, ... +{ + va_list ap; + + [self encodeName: name]; + va_start (ap, types); + while (*types) + { + [self encodeValueOfCType: types + at: va_arg(ap, void*) + withName: NULL]; + types = objc_skip_typespec (types); + } + va_end (ap); +} + +- (void) decodeWithName: (id *)name + valuesOfCTypes: (const char *)types, ... +{ + va_list ap; + + [self decodeName: name]; + va_start (ap, types); + while (*types) + { + [self decodeValueOfCType: types + at: va_arg (ap, void*) + withName: NULL]; + types = objc_skip_typespec (types); + } + va_end (ap); +} + - (void) encodeIndent { /* Do nothing */