YAML.framework icon indicating copy to clipboard operation
YAML.framework copied to clipboard

Support immutable containers

Open ghost opened this issue 13 years ago • 0 comments

YAML.framework does not currently support kYAMLReadOptionImmutable except for NSString, this change uses the optimized ::copy message of NSMutableArray and NSMutableDictionary to make container immutable after the population of the graph. ::copy returns self in an immutable container. Also to support this the YAML.framework API is changed to always return immutable types whether or not the actual reference points to a mutable type or not. If you want a mutable container, cast it, if you use the flag kYAMLReadOptionImmutable casting will fail.

ghost avatar Jan 13 '13 10:01 ghost