Differences From Artifact [9691c753e2]:
- File
src/OFObject.m
— part of check-in
[b96b150ce3]
at
2013-01-22 02:31:22
on branch trunk
— OFStream: Add property for writeBufferEnabled.
This also renames the getter to -[isWriteBufferEnabled]. (user: js, size: 24848) [annotate] [blame] [check-ins using]
To Artifact [68901c9b91]:
- File src/OFObject.m — part of check-in [e403ca05cb] at 2013-02-18 10:38:00 on branch trunk — Add -[OFDataArray initWithItemSize:capacity:]. (user: js, size: 24834) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
834 835 836 837 838 839 840 841 842 843 844 845 846 847 | return [OFString stringWithFormat: @"<%@: %p>", [self className], self]; } - (void*)allocMemoryWithSize: (size_t)size { void *pointer; struct pre_mem *preMem; if OF_UNLIKELY (size > SIZE_MAX - PRE_IVARS_ALIGN) @throw [OFOutOfRangeException exceptionWithClass: [self class]]; if OF_UNLIKELY ((pointer = malloc(PRE_MEM_ALIGN + size)) == NULL) @throw [OFOutOfMemoryException exceptionWithClass: [self class] requestedSize: size]; | > > > | 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 | return [OFString stringWithFormat: @"<%@: %p>", [self className], self]; } - (void*)allocMemoryWithSize: (size_t)size { void *pointer; struct pre_mem *preMem; if OF_UNLIKELY (size == 0) return NULL; if OF_UNLIKELY (size > SIZE_MAX - PRE_IVARS_ALIGN) @throw [OFOutOfRangeException exceptionWithClass: [self class]]; if OF_UNLIKELY ((pointer = malloc(PRE_MEM_ALIGN + size)) == NULL) @throw [OFOutOfMemoryException exceptionWithClass: [self class] requestedSize: size]; |
︙ | ︙ | |||
860 861 862 863 864 865 866 | return (char*)pointer + PRE_MEM_ALIGN; } - (void*)allocMemoryWithSize: (size_t)size count: (size_t)count { | < < < | 863 864 865 866 867 868 869 870 871 872 873 874 875 876 | return (char*)pointer + PRE_MEM_ALIGN; } - (void*)allocMemoryWithSize: (size_t)size count: (size_t)count { if OF_UNLIKELY (count > SIZE_MAX / size) @throw [OFOutOfRangeException exceptionWithClass: [self class]]; return [self allocMemoryWithSize: size * count]; } - (void*)resizeMemory: (void*)pointer |
︙ | ︙ |