Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (19 sloc) 0.504 kb
//
// Licensed under the terms in License.txt
//
// Copyright 2010 Allen Ding. All rights reserved.
//
#import "NSValue+KiwiAdditions.h"
#import "KWObjCUtilities.h"
@implementation NSValue(KiwiAdditions)
#pragma mark -
#pragma mark Accessing Data
- (NSData *)dataValue {
NSUInteger length = KWObjCTypeLength([self objCType]);
void *buffer = malloc(length);
[self getValue:buffer];
NSData *data = [NSData dataWithBytes:buffer length:length];
free(buffer);
return data;
}
@end
Jump to Line
Something went wrong with that request. Please try again.