@@ -21,12 +21,13 @@ #import "OFData.h" #import "OFInvalidArgumentException.h" @interface OFNull () -- (OFString *)of_JSONRepresentationWithOptions: (int)options - depth: (size_t)depth; +- (OFString *) + of_JSONRepresentationWithOptions: (OFJSONRepresentationOptions)options + depth: (size_t)depth; @end static OFNull *null = nil; @implementation OFNull @@ -47,11 +48,11 @@ [self release]; pool = objc_autoreleasePoolPush(); if (![element.name isEqual: self.className] || - ![element.namespace isEqual: OF_SERIALIZATION_NS]) + ![element.namespace isEqual: OFSerializationNS]) @throw [OFInvalidArgumentException exception]; objc_autoreleasePoolPop(pool); return [OFNull null]; @@ -71,11 +72,11 @@ { void *pool = objc_autoreleasePoolPush(); OFXMLElement *element; element = [OFXMLElement elementWithName: self.className - namespace: OF_SERIALIZATION_NS]; + namespace: OFSerializationNS]; [element retain]; objc_autoreleasePoolPop(pool); @@ -85,16 +86,18 @@ - (OFString *)JSONRepresentation { return [self of_JSONRepresentationWithOptions: 0 depth: 0]; } -- (OFString *)JSONRepresentationWithOptions: (int)options +- (OFString *)JSONRepresentationWithOptions: + (OFJSONRepresentationOptions)options { return [self of_JSONRepresentationWithOptions: options depth: 0]; } -- (OFString *)of_JSONRepresentationWithOptions: (int)options +- (OFString *) + of_JSONRepresentationWithOptions: (OFJSONRepresentationOptions)options depth: (size_t)depth { return @"null"; } @@ -104,11 +107,11 @@ return [OFData dataWithItems: &type count: 1]; } - (OFData *)ASN1DERRepresentation { - const unsigned char bytes[] = { OF_ASN1_TAG_NUMBER_NULL, 0 }; + const unsigned char bytes[] = { OFASN1TagNumberNull, 0 }; return [OFData dataWithItems: bytes count: sizeof(bytes)]; } - (instancetype)autorelease { @@ -124,13 +127,13 @@ { } - (unsigned int)retainCount { - return OF_RETAIN_COUNT_MAX; + return OFMaxRetainCount; } - (void)dealloc { OF_DEALLOC_UNSUPPORTED } @end