Differences From Artifact [012cfeffa7]:
- File src/OFObject+Serialization.m — part of check-in [8892ae9fcc] at 2012-07-12 01:28:46 on branch trunk — Don't access isa directly. (user: js, size: 1643) [annotate] [blame] [check-ins using]
To Artifact [d27599f768]:
- File
src/OFObject+Serialization.m
— part of check-in
[a6ee2b2065]
at
2012-07-31 12:05:46
on branch trunk
— Slightly changed serialization format.
printf's %a was too fragile to serialize floats and doubles, as it was
behaving differently on different OSes and OS versions. Instead, a hex
representation of the float/double in big endian is used now. While this
is less readable, it is guaranteed to be accurate and always the same. (user: js, size: 1643) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
42 43 44 45 46 47 48 | pool = [[OFAutoreleasePool alloc] init]; element = [(id)self XMLElementBySerializing]; root = [OFXMLElement elementWithName: @"serialization" namespace: OF_SERIALIZATION_NS]; [root addAttributeWithName: @"version" | | | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | pool = [[OFAutoreleasePool alloc] init]; element = [(id)self XMLElementBySerializing]; root = [OFXMLElement elementWithName: @"serialization" namespace: OF_SERIALIZATION_NS]; [root addAttributeWithName: @"version" stringValue: @"1"]; [root addChild: element]; ret = [@"<?xml version='1.0' encoding='UTF-8'?>\n" stringByAppendingString: [root XMLStringWithIndentation: 2]]; [ret retain]; [pool release]; [ret autorelease]; return ret; } @end |